Namespace Serenity.InputGateway.Installation.Editor.Builder
Classes
CreatePlayerInputWindow
Step-by-step window for creating or updating the PlayerInput aggregate's asset chain in one run. Mirrors
CreateGameModeSettingsWindow's shape: the window only collects input and renders results,
PlayerInputCreator does the actual validation and generation work — this window never
mutates an asset directly.
PlayerInputActionAssetCreator
Creates a brand-new UnityEngine.InputSystem.InputActionAsset (.inputactions) on disk — the "Create New…" shortcut next to CreatePlayerInputWindow's Input Asset field, for a project that has none yet.
Prefers copying the installed Input System package's own project-wide default template (a "Player" map plus a "UI" map with Navigate/Submit/Cancel — the same content "Assets ▸ Create ▸ Input Actions" and the Project Settings ▸ Input System Package "Create asset" button produce), so the created asset already matches what Unity itself ships. Falls back to Serenity.InputGateway.Installation.Editor.Builder.PlayerInputActionAssetCreator.BuildMinimalUiOnlyTemplateJson — a single "UI" map with just Navigate/Submit/Cancel, matching this wizard's own Definition step defaults — when that template is not present (an Input System package version without the project-wide actions feature).
PlayerInputCreator never creates or retags the InputAsset reference itself — it is
always an externally-authored asset the caller assigns. This type is the one place that DOES create one,
so it registers the result as Addressable with PLAYER_INPUT, mirroring every
asset PlayerInputCreator.ResolveOrCreateByIdInFolder<TSettings> creates for the same module.
PlayerInputCreator
Generates (or updates) the PlayerInput aggregate's asset chain: a UnityPlayerInputSettingsDefinition and, in Multiplayer, the three settings assets it can reference — Serenity.InputGateway.Infrastructure.Settings.UnityPlayerInputRoutingSettings, Serenity.InputGateway.Infrastructure.Settings.UnityPlayerInputJoinGateSettings, and Serenity.InputGateway.Infrastructure.Settings.UnityPlayerInputDeviceFilterSettings. This is the most complex creator in the project (four inter-referencing assets); a dedicated wizard window over this engine ships separately.
Resolution is by-Id-in-folder for all four types, mirroring
Serenity.GameMode.Installation.Editor.Builder.GameModeSettingsCreator: nothing at runtime
resolves any of these four assets by Id — UnitySerenityInstaller assigns the
UnityPlayerInputSettingsDefinition directly on the composition root, and the Definition in
turn either carries a direct routing reference or the installer falls back to an
Addressables-label lookup (see below) — so more than one instance of any of the four types can
legitimately exist per project (e.g. per build configuration), exactly like Logging's profiles.
The routing fallback is NOT null-tolerant end to end — verified by reading both call sites.
UnityPlayerInputInstaller.InstallInputRoutingSettingsFromDefinition uses the Definition's
own routing field when assigned; otherwise it calls
UnityAssetUtils.LoadAllFromAnyBlocking<UnityPlayerInputRoutingSettings> over the
PLAYER_INPUT label and takes the first match. If THAT also finds nothing, the
resolved routing stays null, and Install() unconditionally calls
InstallUiInputRouter → UnityPlayerInputUiInputRouterFactory.Create →
UiInputRouterFactoryInput.EnsureValid(), which throws ArgumentNullException when
RoutingSettings is null — a hard boot crash, not a graceful degrade. This is why every asset this
creator produces is retagged with PLAYER_INPUT (not just for inventory
consistency, unlike GameMode's settings — here the label is load-bearing for the fallback), and why
SinglePlayer — which deliberately leaves the Definition's routing
reference untouched — validates (warns, never blocks) whether a labeled
Serenity.InputGateway.Infrastructure.Settings.UnityPlayerInputRoutingSettings already exists anywhere the fallback could find it. By
contrast, InstallJoinBehavior and UnityPrimaryInputGate.IsDeviceAllowedForPrimary both
null-check routing and degrade gracefully (join disabled, any device allowed as primary) — only the UI
router path is a hard crash.
Player Prefab is authored as a UnityEngine.GameObject, not the strongly-typed
UnityEngine.InputSystem.PlayerInput field the Definition actually stores. A designer drags a prefab asset; this
engine resolves its UnityEngine.InputSystem.PlayerInput component (mirroring
UnityPlayerInputInstaller.InstallJoinBehavior's own GetComponent<PlayerInput>() check)
and warns — never blocks, matching the installer's own severity — when the prefab has none.
onPrimaryJoinTask is a plain reference, not authored. It is a UnityReflectionCallTaskDefinition — a generic reflection-call task asset with its own authoring surface entirely out of scope here; this engine only assigns whatever reference is handed to it (or preserves the existing one on update), the same way it treats InputAsset.
A wizard window collecting input and rendering results ships in a separate change; every asset mutation lives here.
PlayerInputCreator.DeviceFilterInput
Fields applied to a Serenity.InputGateway.Infrastructure.Settings.UnityPlayerInputDeviceFilterSettings — only used in Multiplayer.
PlayerInputCreator.Input
Everything needed to create or update the PlayerInput asset chain.
PlayerInputCreator.JoinGateInput
Fields applied to a Serenity.InputGateway.Infrastructure.Settings.UnityPlayerInputJoinGateSettings — only used in Multiplayer.
PlayerInputCreator.Result
Outcome of a Create(Input) call.
PlayerInputCreator.RoutingInput
Fields applied to a Serenity.InputGateway.Infrastructure.Settings.UnityPlayerInputRoutingSettings — only used in Multiplayer.
Enums
PlayerInputCreator.CreationMode
Which asset chain this run authors — see the type doc for exactly what each mode leaves untouched.