logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class CreateThemeWindow

    Stepped wizard (Tools ▸ Serenity ▸ UI ▸ Theme Builder) that generates a complete UI theme — every component prefab plus the UnityUiThemeDefinition asset — from scratch, so a project that doesn't have the sample themes imported (e.g. an Asset Store consumer) can still get a working theme.

    The stepped-wizard scaffolding — the titled header and clickable breadcrumb, the body scroll, the footer and its forward-navigation error gate — comes from Serenity.Global.Infrastructure.Editor.SerenityStepWizardWindow`1; this window declares only its own step table, the persistent schematic preview strip it draws above the footer, and what the primary action does. The shared breadcrumb this window now draws through is the one that was extracted FROM it, so it is the same chrome coming back: same accent tint, same "Step N of M" line, same rule. Two things it does not reproduce, both of them the shared control's own rules — a visited step's button reads "✓ Identity" and is tinted from the shared Success green rather than this window's own slightly lighter one, and a forward breadcrumb jump past a step that is currently reporting an error is now refused instead of allowed. All asset mutation still happens in Serenity.Ui.Installation.Editor.Settings.Builder.ThemeCreator.

    Inheritance
    object
    CreateThemeWindow
    Namespace: Serenity.Ui.Installation.Editor.Settings.Builder
    Assembly: Serenity.UnityUi.Installation.Editor.dll
    Syntax
    public sealed class CreateThemeWindow : SerenityStepWizardWindow<CreateThemeWindow.WizardStep>

    Constructors

    CreateThemeWindow()

    Declaration
    public CreateThemeWindow()

    Properties

    PrimaryButtonLabel

    Declaration
    protected override string PrimaryButtonLabel { get; }
    Property Value
    Type Description
    string

    WindowTitle

    Declaration
    protected override string WindowTitle { get; }
    Property Value
    Type Description
    string

    Methods

    BuildSteps()

    The visit order — Palette sits right after Identity so colors are chosen before the Style and Background steps that reference them. Every row recomputes the cached Summary validation on entry: the old GoToStep marked it stale after every step change, breadcrumb click, Back and Next alike, and this is that same rule stated on the rows instead of on one hand-rolled jump handler the footer also had to route through.

    Declaration
    protected override WizardStepDescriptor<CreateThemeWindow.WizardStep>[] BuildSteps()
    Returns
    Type Description
    WizardStepDescriptor<WizardStep>[]

    DrawAboveFooter()

    Closes the body's change check and draws the persistent schematic preview strip, in that order — the base runs this immediately after the body scroll closes and before the footer, which is where the old OnGUI did both.

    Declaration
    protected override void DrawAboveFooter()

    DrawUnderBreadcrumb()

    Opens the change check that spans exactly the step body — the base runs this immediately after applying a breadcrumb jump and immediately before the body scroll, which is where the old OnGUI opened it. DrawAboveFooter() closes it.

    Declaration
    protected override void DrawUnderBreadcrumb()

    OnBeforeDrawStep()

    Declaration
    protected override void OnBeforeDrawStep()

    OnPrimaryAction()

    Reveals the created theme and then asks, in a modal, whether to start another run. Only the base's fourth finishing shape fits the pair: the ping has to happen before the boot-task wiring and the dialog, and the move back to Identity only happens if the author picks "Create Another" — so the reveal is Serenity.Global.Infrastructure.Editor.SerenityStepWizardWindow`1.PingCreatedAssetOnly(System.String) on its own, and the restart is a plain Serenity.Global.Infrastructure.Editor.SerenityStepWizardWindow`1.GoTo(`0), which is the backward jump the old GoToStep already made (the error gate never refuses a backward move).

    Declaration
    protected override void OnPrimaryAction()

    ShowWindow()

    Declaration
    public static void ShowWindow()
    In this article
    © 2026 Serenity. All Rights Reserved