logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.Ui.Infrastructure.Editor.Builder

    Classes

    CompositeNavPathRewriter

    The composite-child transition-path rewrite algorithm, extracted out of UnityCompositeViewDefinitionEditor so the CustomEditor only drives the "what changed" detection while this class owns the "::"-path segment algebra. Lives beside CompositeNavWiring (which already centralizes the same separator/path conventions for the builder) rather than in Business/Ui: RewriteMenuTransitionSegment(string, string, string) is inherently editor tooling (it walks and mutates UnityEditor.SerializedObjects across the project via UnityEditor.AssetDatabase), so the class as a whole cannot be engine-agnostic even though its innermost helper, RewriteChildSegment(string, string, string, string), is pure string logic. Splitting just that one pure method into Business would separate the rule from the only code that exercises it, without giving any other consumer (runtime only walks paths via UnityMenuView.Actions; nothing else rewrites them) a reason to depend on it — so this stays extract-only, editor-side.

    CompositeNavWiring

    Pure helpers for the navigation strings the builder writes into generated menus: composite-child transition paths and id sanitization. Centralized so the generator and (later) the composite inspector's child-swap rewrite share one source of truth.

    CompositeViewBuilderWindow

    Visual authoring window for composite-view screens: pick a layout template, name the sections, and Generate — the tool creates the composite + menu assets with navigation fully wired, hiding the manual transition plumbing. Menu: Serenity ▸ UI ▸ Composite View Builder.

    CompositeViewGenerator

    Turns a ContainerNode region tree (from TemplateBuilder) into the actual asset graph: generated menu definitions, nested composite definitions, and the root composite, with navigation wired. Children are created before parents (parents reference child assets), ids are pre-checked for collisions, and a failure rolls back every asset created in the run.

    CompositeViewGenerator.Result

    Outcome of a Generate(ContainerNode, string, bool, bool) run.

    CompositeWireframeDrawer

    Draws a flexbox wireframe of a IRegionNode tree into an IMGUI rect, so the builder window can show a live thumbnail of the chosen template. Leaves are labelled boxes; a switcher shows its first/active View with a marker. Project convention: ROW stacks vertically, COLUMN side-by-side.

    ContainerNode

    A container region realized as a composite-view asset: it arranges Children with a flexbox Direction and either stacks them (STACK) or shows one at a time (SWITCHER, driven by a navbar).

    LeafNode

    A leaf region that hosts a single menu — either a menu the tool generates, or an existing view definition the designer assigned. A leaf flagged IsNavbar is the generated navigation menu whose options (NavTargets) switch a sibling content switcher.

    TemplateBuilder

    Maps a TemplateParams onto a region tree (IRegionNode), assigning ids, sizes, content modes and — for navbar templates — fully-wired navbar targets. Pure and unit-testable; the generator turns the returned tree into assets.

    TemplateParams

    Inputs for Build(TemplateParams).

    Structs

    NavTarget

    One wired navigation target on a navbar: the option label and the full composite-path it activates (e.g. "Root::Content::Tab1"), or the Back sentinel.

    Interfaces

    IRegionNode

    Engine-agnostic description of one region in a composite-view screen, produced by TemplateBuilder from a template + parameters and consumed by the generator to create the actual UnityCompositeViewDefinition / menu assets. Kept free of UnityEditor and asset APIs so the template-to-tree mapping is pure and unit-testable.

    Enums

    CompositeTemplate

    The layout templates the Composite View Builder offers.

    NavbarSide

    Where the navbar sits relative to the content (decides the root direction + child order).

    In this article
    © 2026 Serenity. All Rights Reserved