logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class CompositePreviewBuilder

    Builds a composite view into the preview canvas by flex-solving its child regions (reusing the runtime FlexboxSolver + LayoutConfig) and recursing — nested composites recurse, hosted menus are built by MenuPreviewBuilder. SWITCHER containers show their resolved active child. Guards depth and reference cycles like the original wireframe.

    Inheritance
    object
    CompositePreviewBuilder
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Serenity.Ui.Infrastructure.Editor.Preview
    Assembly: Serenity.UnityUi.Infrastructure.Editor.dll
    Syntax
    public static class CompositePreviewBuilder

    Methods

    Build(UnityCompositeViewDefinition, UnityUiThemeDefinition, RectTransform, Vector2, Func<UnityCompositeViewDefinition, IReadOnlyList<UnityCompositeViewChild>, string>)

    Builds composite filling the region-sized area under parent.

    Declaration
    public static void Build(UnityCompositeViewDefinition composite, UnityUiThemeDefinition theme, RectTransform parent, Vector2 region, Func<UnityCompositeViewDefinition, IReadOnlyList<UnityCompositeViewChild>, string> resolveActiveChild)
    Parameters
    Type Name Description
    UnityCompositeViewDefinition composite

    The composite definition.

    UnityUiThemeDefinition theme

    Theme supplying hosted-menu visuals.

    RectTransform parent

    The RectTransform to build under (a preview canvas or a parent region).

    Vector2 region

    The size of the area to fill, in canvas units.

    Func<UnityCompositeViewDefinition, IReadOnlyList<UnityCompositeViewChild>, string> resolveActiveChild

    Resolves a SWITCHER's active child id (window override → initial → first).

    In this article
    © 2026 Serenity. All Rights Reserved