logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityMenuRootBuilder

    Builder responsible for creating and configuring the root menu view structure.
    Handles view GameObject creation, component setup, initialization, and options wrapper configuration.

    Inheritance
    object
    UnityMenuRootBuilder
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Menu.Infrastructure.Views.Factories
    Assembly: Serenity.UnityMenu.Infrastructure.dll
    Syntax
    public class UnityMenuRootBuilder

    Constructors

    UnityMenuRootBuilder(IUiService)

    Declaration
    public UnityMenuRootBuilder(IUiService uiService)
    Parameters
    Type Name Description
    IUiService uiService

    Methods

    CreateViewComponent(GameObject, IMenuSettingsDefinition)

    Creates and configures the UnityMenuView component on the provided GameObject.

    Declaration
    public UnityMenuView CreateViewComponent(GameObject viewGameObject, IMenuSettingsDefinition menuSettings)
    Parameters
    Type Name Description
    GameObject viewGameObject
    IMenuSettingsDefinition menuSettings
    Returns
    Type Description
    UnityMenuView

    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
    Type Name Description
    Canvas canvas
    IMenuSettingsDefinition menuSettings
    Returns
    Type Description
    GameObject

    InitializeView(IViewModel, MenuUseCases, IViewBrowserService, IEventDispatcherService, UnityMenuView, List<IFoundationActionDefinition>, AudioPlayerPlayClip, string, IGameSettingsService)

    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)
    Parameters
    Type Name Description
    IViewModel viewModel
    MenuUseCases menuUseCases
    IViewBrowserService viewBrowserService
    IEventDispatcherService eventDispatcherService
    UnityMenuView view
    List<IFoundationActionDefinition> menuActions
    AudioPlayerPlayClip audioPlayerPlayClip
    string audioServiceId
    IGameSettingsService gameSettingsService

    SetOptionsWrapperGameObject(GameObject, UnityMenuView)

    Creates and configures the options wrapper GameObject that contains all menu option UI components.

    Declaration
    public void SetOptionsWrapperGameObject(GameObject viewGameObject, UnityMenuView view)
    Parameters
    Type Name Description
    GameObject viewGameObject
    UnityMenuView view
    In this article
    © 2026 Serenity. All Rights Reserved