Namespace Serenity.GameMode.Installation.Editor.Builder
Classes
CreateGameModeSettingsWindow
Step-by-step window for creating or updating a UnityGameModeSettingsDefinition in one run.
Mirrors Serenity.Logging.Infrastructure.Editor.Builder.CreateLoggingProfileWindow's shape: the
window only collects input and renders results, GameModeSettingsCreator does the actual
validation and generation work.
GameModeSettingsCreator
Generates (or updates) a UnityGameModeSettingsDefinition — the flow state machine driving Menu/Game/Pause, action-map switching, pause behavior, and the per-mode transition signal lists. Today the only tool that creates this asset is the one-shot Setup Assistant (via a generic recipe asset with a single field populated); this is the first dedicated creation wizard for the aggregate.
Resolution mirrors Serenity.Logging.Infrastructure.Editor.Builder.LoggingProfileCreator's
UnityLogProfile, not its two sink settings. UnitySerenityInstaller.GameModeSettingsDefinition
is assigned directly on the composition root — nothing resolves it by Addressables label at runtime
(unlike, say, the Logging sinks, which the installer loads via module:logging) — so more than one
UnityGameModeSettingsDefinition can legitimately exist in a project (e.g. one per build
configuration), exactly like the project's own shipped Logging profiles. A settings asset therefore
resolves by Id within OutputFolderPath.
It is still retagged with GAME_MODE on creation for inventory consistency, even
though nothing loads it by that label today.
The Input Asset field is authoring-only. UnityGameModeService never reads
InputAsset at runtime — SetActionMap calls
IPlayerInputService.SetActionMap(name), and BindPauseAction reflects the actual
PlayerInput.actions asset off the player-input service. The field exists solely so
UnityGameModeSettingsDefinitionEditor (and this wizard) can render action-map name dropdowns
instead of free-text fields. Consequently this wizard cross-checks it against the project's own
InputAsset (when exactly one such settings asset exists)
and warns — never blocks — on a mismatch, since a different asset here would silently populate the
dropdowns with map names that do not exist in the asset actually switched at runtime.
Transition signals are polymorphic instances, not string ids.
Signals /
ExitSignals are [SerializeReference] List<EventDispatcherSignal> — this wizard
authors instances of the chosen concrete types (using the same
Serenity.Global.Infrastructure.Settings.Editor.EventDispatcherSignalTypePicker type catalog the inspector and this wizard both draw from),
mirroring what UnityGameModeSettingsDefinitionEditor's own "Add" button does. Deep per-signal
field configuration (e.g. a music-track reference inside a custom signal) remains the Inspector's job —
unchanged by this wizard. Replacing a group is therefore preserve-by-position-and-type (see
Serenity.GameMode.Installation.Editor.Builder.GameModeSettingsCreator.ComputeReplacementSignalList(System.Collections.Generic.IReadOnlyList{Serenity.EventDispatcher.Domain.Entities.EventDispatcherSignal},System.Collections.Generic.List{Serenity.GameMode.Installation.Editor.Builder.GameModeSettingsCreator.TransitionSignalRow})): the existing instance at a position survives, hand-configured
fields intact, when the row at that position still asks for the same concrete type; only a
changed/added/removed position creates a fresh default or drops the old instance, and Create(Input)
warns with an exact count whenever it does.
GameModeSettingsCreator.Input
Everything needed to create or update a UnityGameModeSettingsDefinition.
GameModeSettingsCreator.Result
Outcome of a Create(Input) call.
GameModeSettingsCreator.TransitionSignalRow
One authored row: which concrete EventDispatcherSignal subtype to append to
Mode's enter (IsExit false) or exit (true) list, in row order.
[Serializable] so CreateGameModeSettingsWindow can hold rows in a
[SerializeField] list that survives a domain reload.