logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityCascadeViewFactory

    Builds a UnityCascadeMenuView for a UnityCascadeViewDefinition under the UI canvas: a full-stretch RectTransform GameObject carrying the view component, configured with the definition and the services it needs. The view's UI (renderer + Serenity components) is created lazily on first show.

    Inheritance
    object
    UnityCascadeViewFactory
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Menu.Infrastructure.Cascade.View
    Assembly: Serenity.UnityMenu.Infrastructure.dll
    Syntax
    public sealed class UnityCascadeViewFactory
    Remarks

    Intentionally Unity-only: only UnityCascadeViewInstaller (same folder) consumes this factory, and its job — instantiating a GameObject/RectTransform and attaching a MonoBehaviour — is pure Unity scene-construction plumbing. No Business factory port for v1; a non-Unity port reimplements this class wholesale rather than porting an abstraction.

    Constructors

    UnityCascadeViewFactory(ILogService)

    Creates the factory.

    Declaration
    public UnityCascadeViewFactory(ILogService logService)
    Parameters
    Type Name Description
    ILogService logService

    Logging service forwarded to each created view.

    Methods

    CreateView(UnityCascadeViewDefinition, Transform, IEventDispatcherService, IViewRouter, IViewBrowserService, AudioPlayerPlayClip, string)

    Creates and configures a cascade view under the given canvas transform.

    Declaration
    public UnityCascadeMenuView CreateView(UnityCascadeViewDefinition definition, Transform canvasTransform, IEventDispatcherService eventDispatcherService, IViewRouter viewRouter, IViewBrowserService viewBrowserService, AudioPlayerPlayClip audioPlayerPlayClip, string audioServiceId)
    Parameters
    Type Name Description
    UnityCascadeViewDefinition definition

    The cascade view definition to render.

    Transform canvasTransform

    The UI canvas transform the view is parented under.

    IEventDispatcherService eventDispatcherService

    Dispatcher forwarded to the view's cascade context.

    IViewRouter viewRouter

    Router the view uses to return to its opener.

    IViewBrowserService viewBrowserService

    Browser history service the view pops its own entry from before returning to its opener (see Serenity.Menu.Infrastructure.Cascade.View.UnityCascadeMenuView.ReturnToOpener).

    AudioPlayerPlayClip audioPlayerPlayClip
    string audioServiceId
    Returns
    Type Description
    UnityCascadeMenuView

    The configured (still hidden) cascade view.

    In this article
    © 2026 Serenity. All Rights Reserved