logo SERENITY
Game Systems Foundation
Search Results for

    Show / Hide Table of Contents

    Class MenuServiceSettingsStepGui

    The Menu Manager wizard's Settings step: the project-wide UnityMenuServiceSettingsDefinition singleton target, its identity fields, and the folder new menu assets are written to. Owns every field MenuManagerWindow used to carry directly for this step, plus the drawing and validation logic that only ever touches them — a facet with its own serialized state and its own reason to change, kept out of the window so the window's own file does not grow with a fifth step's worth of fields and helpers on top of the other four.

    Inheritance
    object
    MenuServiceSettingsStepGui
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    Namespace: Serenity.Menu.Infrastructure.Editor.Builder
    Assembly: Serenity.UnityMenu.Infrastructure.Editor.dll
    Syntax
    public sealed class MenuServiceSettingsStepGui
    Remarks

    Serializable, and held as a single [SerializeField] field on MenuManagerWindow — the same way Serenity.Global.Infrastructure.Editor.SerenityWizardTargetAsset itself is serialized on every wizard window that carries one — so a domain reload restores this step's half-authored fields exactly as it did before this type existed, when they were plain [SerializeField] fields on the window itself.

    Constructors

    MenuServiceSettingsStepGui()

    Declaration
    public MenuServiceSettingsStepGui()

    Properties

    BorderMargin

    Declaration
    public Vector2 BorderMargin { get; }
    Property Value
    Type Description
    Vector2

    CanProceed

    Whether MenuManagerWindow.DoCreate may proceed — false while an unconfirmed package-content match blocks the target, mirroring Serenity.Global.Infrastructure.Editor.SerenityWizardTargetAsset.CanProceed.

    Declaration
    public bool CanProceed { get; }
    Property Value
    Type Description
    bool

    ControllerId

    Declaration
    public string ControllerId { get; }
    Property Value
    Type Description
    string

    ExistingAssetPath

    Project path of the existing settings singleton being updated, or empty while creating new.

    Declaration
    public string ExistingAssetPath { get; }
    Property Value
    Type Description
    string

    MenusOutputFolderPathOrDefault

    Declaration
    public string MenusOutputFolderPathOrDefault { get; }
    Property Value
    Type Description
    string

    ServiceAssetName

    Declaration
    public string ServiceAssetName { get; }
    Property Value
    Type Description
    string

    ServiceId

    Declaration
    public string ServiceId { get; }
    Property Value
    Type Description
    string

    ServiceOutputFolderPathOrDefault

    Declaration
    public string ServiceOutputFolderPathOrDefault { get; }
    Property Value
    Type Description
    string

    Target

    The settings singleton's target, for MenuManagerWindow's own OwnedTargets.

    Declaration
    public SerenityWizardTargetAsset Target { get; }
    Property Value
    Type Description
    SerenityWizardTargetAsset

    UpdatesInPlace

    Whether the run updates an existing settings singleton in place rather than creating one.

    Declaration
    public bool UpdatesInPlace { get; }
    Property Value
    Type Description
    bool

    Methods

    ConsumeReachableGraphLoadRequest()

    The single gate OnBeforeDrawStep() checks to react once to a resolved target by loading the reachable menu graph. CanProceed is checked BEFORE ConsumeSeedRequest(out Object) is ever called: ConsumeSeedRequest(out Object) latches the resolved path as seeded the moment it is called, whether or not the caller goes on to act on it, so calling it while a package-content match is still unconfirmed would burn the one-time latch on a target the wizard cannot yet load from — the author's later confirmation would then never trigger the load, because the path already reads as seeded. Short-circuiting on CanProceed first leaves the latch untouched while blocked, so confirming fires the load exactly once.

    Declaration
    public bool ConsumeReachableGraphLoadRequest()
    Returns
    Type Description
    bool

    ConsumeSeedRequest(out Object)

    Forwards Serenity.Global.Infrastructure.Editor.SerenityWizardTargetAsset.ConsumeSeedRequest(UnityEngine.Object@) — the window reacts to a resolved existing target by loading the whole menu graph reachable from its project's UnityUiSettings.InitialViewId as editable drafts, independently of ConsumeTargetChanged()'s own reaction (seeding this step's own fields).

    Declaration
    public bool ConsumeSeedRequest(out Object resolved)
    Parameters
    Type Name Description
    Object resolved
    Returns
    Type Description
    bool

    ConsumeTargetChanged()

    Forwards Serenity.Global.Infrastructure.Editor.SerenityWizardTargetAsset.ConsumeTargetChanged — the window reacts to a change by calling SeedServiceFieldsFromTarget().

    Declaration
    public bool ConsumeTargetChanged()
    Returns
    Type Description
    bool

    DescribeStepError()

    This step's own blocking error — read by MenuManagerWindow.DescribeSettingsStepError for the breadcrumb's step-error gate.

    Declaration
    public string DescribeStepError()
    Returns
    Type Description
    string

    DescribeTargetLine()

    One line describing where the service settings singleton will be written, for the Summary step.

    Declaration
    public string DescribeTargetLine()
    Returns
    Type Description
    string

    Draw(Action<string>)

    Draws every field of this step.

    Declaration
    public void Draw(Action<string> logWarning)
    Parameters
    Type Name Description
    Action<string> logWarning

    The window's activity log, forwarded to Serenity.Global.Infrastructure.Editor.SerenityWizardTargetAssetGui.DrawOutputFolderSection(Serenity.Global.Infrastructure.Editor.SerenityWizardTargetAsset,Serenity.Global.Infrastructure.Editor.SerenityFolderField@,Serenity.Global.Infrastructure.Editor.SerenityWizardTargetAssetGui.Model,System.Action{System.String}) for an ambiguous-folder warning.

    EnsureCardinalityConfigured()

    Restates this step's target cardinality — safe and idempotent, unlike RefreshTarget()'s disk resolution, which Serenity.Global.Infrastructure.Editor.SerenityWizardTargetAsset.Refresh(UnityEngine.Object,System.Collections.Generic.IReadOnlyList{System.String})'s own remarks forbid calling from Serenity.Menu.Infrastructure.Editor.Builder.MenuManagerWindow.OnEnable. Every standalone Create*SettingsWindow already restates its own singleton cardinality from its own OnEnable (see e.g. CreateMenuServiceSettingsWindow.OnEnable); this gives the embedded Settings step the same guarantee, so an ambiguous target's Serenity.Global.Infrastructure.Editor.SerenityWizardTargetAsset.BlockingError can still be read after a domain reload that fires OnEnable without going through Open() again.

    Declaration
    public void EnsureCardinalityConfigured()

    PickTarget(Object)

    Records the run's own target choice once the settings singleton has been created or updated, so a following run in the same window session shows "update in place" on it.

    Declaration
    public void PickTarget(Object picked)
    Parameters
    Type Name Description
    Object picked

    RefreshTarget()

    Auto-detects the project-wide UnityMenuServiceSettingsDefinition singleton, the same way CreateMenuServiceSettingsWindow.RefreshTarget does. Called once from Open(), never from OnEnable — OnEnable re-fires on every domain reload and would clobber a half-authored run's target decision.

    Declaration
    public void RefreshTarget()

    RunApprovedWrite<TResult>(Func<TResult>)

    Forwards Serenity.Global.Infrastructure.Editor.SerenityWizardTargetAsset.RunApprovedWrite``1(System.Func{``0}), so the owning window's primary action carries this step's package-content confirmation into the write without reaching past this step for the target it owns.

    Declaration
    public TResult RunApprovedWrite<TResult>(Func<TResult> primaryWrite)
    Parameters
    Type Name Description
    Func<TResult> primaryWrite
    Returns
    Type Description
    TResult
    Type Parameters
    Name Description
    TResult

    SeedIfEmpty()

    Seeds both folder fields with their defaults the first time this step is ever drawn — called from Serenity.Menu.Infrastructure.Editor.Builder.MenuManagerWindow.OnEnable, exactly where the window used to seed its own fields.

    Declaration
    public void SeedIfEmpty()

    SeedServiceFieldsFromTarget()

    Declaration
    public void SeedServiceFieldsFromTarget()

    ValidateServiceAssetNameField(string)

    Declaration
    public string ValidateServiceAssetNameField(string candidateAssetName)
    Parameters
    Type Name Description
    string candidateAssetName
    Returns
    Type Description
    string
    In this article
    © 2026 Serenity. All Rights Reserved