logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class UnityCompositeViewDefinitionEditor

    Inspector for UnityCompositeViewDefinition built on Serenity.Global.Infrastructure.Settings.Editor.FoundationEditor`1, so a composite gets a managed Id/Guid exactly like a menu does (auto-generated Guid, duplicate-id checks, the standard Id field). Without this, a custom view used the default inspector and its Id stayed empty — which made it unusable anywhere a view is referenced by id (the initial-view picker, navigation signals, hosting), since those store the asset's Id.

    Inheritance
    object
    UnityCompositeViewDefinitionEditor
    Namespace: Serenity.Ui.Infrastructure.Editor
    Assembly: Serenity.UnityUi.Infrastructure.Editor.dll
    Syntax
    public class UnityCompositeViewDefinitionEditor : FoundationEditor<UnityCompositeViewDefinition>

    Constructors

    UnityCompositeViewDefinitionEditor()

    Declaration
    public UnityCompositeViewDefinitionEditor()

    Methods

    DrawSerializedFields()

    Draws the composite's fields, special-casing the navigation controls: a child-id dropdown for InitialActiveChildId, the SWITCHER-only content/focus bools (with FocusInitialView gated on IsAlwaysShowingContent), and the STACK-only cross-menu bools (wrap gated on the enable). All other fields render with the default property drawer.

    Declaration
    protected override void DrawSerializedFields()

    OnInspectorGUI()

    Renders the foundation header (Id + Guid) then the composite's own fields (Layout, ContentMode, InitialActiveChildId, Children). Serenity.Global.Infrastructure.Settings.Editor.FoundationEditor`1.OnInspectorGUI draws only the header and commits its own changes, so the remaining serialized fields are drawn here inside an explicit update/apply cycle — otherwise edits to those fields would not be written back.

    Declaration
    public override void OnInspectorGUI()
    In this article
    © 2026 Serenity. All Rights Reserved