Builder responsible for creating and configuring the root menu view structure.
Handles view GameObject creation, component setup, initialization, and options wrapper configuration.
Inheritance
UnityMenuRootBuilder
Assembly: Serenity.UnityMenu.Infrastructure.dll
public class UnityMenuRootBuilder
Constructors
Declaration
public UnityMenuRootBuilder(IUiService uiService)
Parameters
Methods
CreateViewComponent(GameObject, IMenuSettingsDefinition)
Creates and configures the UnityMenuView component on the provided GameObject.
Declaration
public UnityMenuView CreateViewComponent(GameObject viewGameObject, IMenuSettingsDefinition menuSettings)
Parameters
Returns
CreateViewGameObject(Canvas, IMenuSettingsDefinition)
Creates and configures the root GameObject for the menu view with proper parent hierarchy and naming.
Declaration
public GameObject CreateViewGameObject(Canvas canvas, IMenuSettingsDefinition menuSettings)
Parameters
Returns
| Type |
Description |
| GameObject |
|
InitializeView(IViewModel, MenuUseCases, IViewBrowserService, IEventDispatcherService, UnityMenuView, List<IFoundationActionDefinition>, AudioPlayerPlayClip, string, IGameSettingsService, IMenuSettingsDefinition)
Sets all necessary settings and dependencies on the UnityMenuView instance.
Declaration
public void InitializeView(IViewModel viewModel, MenuUseCases menuUseCases, IViewBrowserService viewBrowserService, IEventDispatcherService eventDispatcherService, UnityMenuView view, List<IFoundationActionDefinition> menuActions, AudioPlayerPlayClip audioPlayerPlayClip, string audioServiceId, IGameSettingsService gameSettingsService, IMenuSettingsDefinition menuSettings)
Parameters
SetOptionsWrapperGameObject(GameObject, UnityMenuView, IMenuSettingsDefinition)
Creates and configures the options wrapper GameObject that contains all menu option UI components.
For a scrollable menu, a masked "OptionsViewport" (RectMask2D + ScrollRect) is inserted between
the menu root and the wrapper: the viewport takes the wrapper's usual bottom-anchored placement
and clips overflow, while the wrapper becomes the top-anchored scroll content inside it.
Declaration
public void SetOptionsWrapperGameObject(GameObject viewGameObject, UnityMenuView view, IMenuSettingsDefinition menuSettings)
Parameters