logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Namespace Serenity.Character.Infrastructure.Editor.Builder

    Classes

    CharacterConfigCreator

    Generates (or updates) a single CharacterConfigSO archetype asset from a validated wizard input. Mirrors Serenity.AssetPrefetcher.Infrastructure.Editor.Builder.PrefetchPolicyCreator's per-profile shape: static class, Input/Result DTOs, Validate/Create/Preview, created-paths rollback on failure — folder-shape validation and provisioning borrowed from the shared SettingsAssetAuthoring engine rather than a private copy of that logic.

    Unlike a project-wide settings singleton, CharacterConfigSO assets are explicitly multi-instance by design — UnityCharacterInstaller loads every asset tagged type:character and applies all of them, one per archetype. There is no project-wide "the one" asset to resolve: each archetype resolves independently to an existing asset with a matching Id already living in FolderPath (updated in place) or a brand-new asset created there — mirroring PrefetchPolicyCreator's per-profile resolution, not GameCameraSettingsCreator's singleton one.

    CreateCharacterWindow only collects input and renders results; every asset mutation lives here.

    CharacterConfigCreator.Input

    Everything needed to create or update one archetype asset.

    CharacterConfigCreator.PreviewResult

    A read-only summary of what a Create(Input) call would do, for a Preview step. Never mutates the project.

    CharacterConfigCreator.Result

    Outcome of a Create(Input) call.

    CreateCharacterWindow

    Step-by-step window for creating (or editing) one CharacterConfigSO archetype asset. The stepped-wizard scaffolding — the header and breadcrumb, the body scroll, the footer and its error gate — comes from Serenity.Global.Infrastructure.Editor.SerenityStepWizardWindow`1; this window declares only its own step table and what the primary action does. It never mutates an asset itself: CharacterConfigCreator does the actual validation and generation work.

    Enums

    CreateCharacterWindow.WizardStep

    public (not private) for two reasons: C# requires a class's base type to be at least as accessible as the class itself, and this enum is that base type's argument; and Serenity.Character.Infrastructure.Editor.Builder.CharacterConfigWizardStepValidator switches on it directly, so the step-error rule lives beside the Validate(Input) call it wraps instead of inside this window.

    MountTarget

    The infrastructure element a Character archetype's prefab is mounted on, authored by CharacterConfigCreator. Closed by design: GameRail and StageSpawnPoint are structurally asymmetric today — one mutates the prefab, the other only guides authoring toward Wave data — so a shared discovery abstraction (e.g. an IMountable interface resolved via TypeCache) is not justified. Extract one only once a third component-shaped mount actually appears.

    In this article
    © 2026 Serenity. All Rights Reserved