logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Interface IUnityMenuViewInstanceFactory

    Unity/Infrastructure-side abstraction that wraps the per-menu visual construction step:
    it creates the Unity menu view through IMenuViewFactory and applies the initial hide, returning the hidden view.
    This is a thin extraction of the construction sequence that previously lived inline in the installer's view-creation loop. It deliberately does NOT create UI options, normalize options, read game settings, build fallback options, create view-models, register presenters, initialize the menu service, or make any lifecycle/instantiation policy decisions.

    Namespace: Serenity.Menu.Infrastructure.Views.Factories
    Assembly: Serenity.UnityMenu.Infrastructure.dll
    Syntax
    public interface IUnityMenuViewInstanceFactory

    Methods

    CreateHiddenView(IMenuServiceSettingsDefinition, IMenuSettingsDefinition, Dictionary<string, UiOption[]>, object, MenuUseCases, IViewModel, IViewBrowserService, IEventDispatcherService, List<IFoundationActionDefinition>, string, IUiThemeDefinition)

    Creates the Unity menu view and applies the initial hide, in exactly the same order the installer uses today: CreateView(...) followed by ExecuteHideMenu().
    The signal behaviour of that sequence is preserved (the trailing hide dispatches the menu's OnHide lifecycle signals once, as it does during eager installation).

    Declaration
    IViewBase CreateHiddenView(IMenuServiceSettingsDefinition menuServiceSettings, IMenuSettingsDefinition menuSettings, Dictionary<string, UiOption[]> uiOptions, object canvas, MenuUseCases menuUseCases, IViewModel viewModel, IViewBrowserService viewBrowserService, IEventDispatcherService eventDispatcherService, List<IFoundationActionDefinition> menuActions, string audioServiceId, IUiThemeDefinition theme)
    Parameters
    Type Name Description
    IMenuServiceSettingsDefinition menuServiceSettings

    The menu service settings definition to be used by the view.

    IMenuSettingsDefinition menuSettings

    The menu settings definition to be used by the view.

    Dictionary<string, UiOption[]> uiOptions

    The complete dictionary of UI options keyed by menu identifier, as prepared by the installer.

    object canvas

    The canvas object where the view will be rendered.

    MenuUseCases menuUseCases

    The menu use cases to be utilized by the view.

    IViewModel viewModel

    The view model instance to be associated with the view.

    IViewBrowserService viewBrowserService

    The view browser service for managing view navigation.

    IEventDispatcherService eventDispatcherService

    The event dispatcher service for handling events.

    List<IFoundationActionDefinition> menuActions

    A list of foundation action definitions associated with the menu.

    string audioServiceId

    The identifier for the audio service to be used by the view.

    IUiThemeDefinition theme

    The UI theme definition to be applied to the view.

    Returns
    Type Description
    IViewBase

    The created menu view instance, already hidden.

    In this article
    © 2026 Serenity. All Rights Reserved