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
MenuServiceSettingsStepGui
Assembly: Serenity.UnityMenu.Infrastructure.Editor.dll
public sealed class MenuServiceSettingsStepGui
Constructors
Declaration
public MenuServiceSettingsStepGui()
Properties
Declaration
public Vector2 BorderMargin { get; }
Property Value
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
Declaration
public string ControllerId { get; }
Property Value
Project path of the existing settings singleton being updated, or empty while creating new.
Declaration
public string ExistingAssetPath { get; }
Property Value
Declaration
public string MenusOutputFolderPathOrDefault { get; }
Property Value
Declaration
public string ServiceAssetName { get; }
Property Value
Declaration
public string ServiceId { get; }
Property Value
Declaration
public string ServiceOutputFolderPathOrDefault { get; }
Property Value
Declaration
public SerenityWizardTargetAsset Target { get; }
Property Value
| Type |
Description |
| SerenityWizardTargetAsset |
|
Whether the run updates an existing settings singleton in place rather than creating one.
Declaration
public bool UpdatesInPlace { get; }
Property Value
Methods
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
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
Forwards Serenity.Global.Infrastructure.Editor.SerenityWizardTargetAsset.ConsumeTargetChanged — the window reacts to a
change by calling SeedServiceFieldsFromTarget().
Declaration
public bool ConsumeTargetChanged()
Returns
This step's own blocking error — read by MenuManagerWindow.DescribeSettingsStepError for
the breadcrumb's step-error gate.
Declaration
public string DescribeStepError()
Returns
One line describing where the service settings singleton will be written, for the Summary step.
Declaration
public string DescribeTargetLine()
Returns
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.
|
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()
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 |
|
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()
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 Parameters
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()
Declaration
public void SeedServiceFieldsFromTarget()
Declaration
public string ValidateServiceAssetNameField(string candidateAssetName)
Parameters
| Type |
Name |
Description |
| string |
candidateAssetName |
|
Returns