Class PlayerInputWizardTargetBindings
Owns CreatePlayerInputWindow's four by-Id-in-folder target/draft bindings — Definition, Routing, Join Gate, Device Filter — as one embedded field instead of four separate ones on the window, and centralizes the retarget-on-Id/folder-change and seed-or-reset-on-consume dance every one of them needs identically. Split out under the file-size ratchet, so the window itself declares one field of this type instead of four separate Serenity.Global.Infrastructure.Editor.SerenityWizardByIdAssetBinding<> fields and repeated retarget/consume calls.
Implements
Inherited Members
Namespace: Serenity.InputGateway.Installation.Editor.Builder
Assembly: Serenity.UnityPlayerInput.Installation.Editor.dll
Syntax
public sealed class PlayerInputWizardTargetBindings : ISerenityWizardDraftHolder
Constructors
PlayerInputWizardTargetBindings()
Declaration
public PlayerInputWizardTargetBindings()
Properties
Definition
Declaration
public SerenityWizardByIdAssetBinding<UnityPlayerInputSettingsDefinition> Definition { get; }
Property Value
| Type | Description |
|---|---|
| SerenityWizardByIdAssetBinding<UnityPlayerInputSettingsDefinition> |
DeviceFilter
Declaration
public SerenityWizardByIdAssetBinding<UnityPlayerInputDeviceFilterSettings> DeviceFilter { get; }
Property Value
| Type | Description |
|---|---|
| SerenityWizardByIdAssetBinding<UnityPlayerInputDeviceFilterSettings> |
JoinGate
Declaration
public SerenityWizardByIdAssetBinding<UnityPlayerInputJoinGateSettings> JoinGate { get; }
Property Value
| Type | Description |
|---|---|
| SerenityWizardByIdAssetBinding<UnityPlayerInputJoinGateSettings> |
LiveDraftInstances
All four live scratch instances, in binding order.
Declaration
public IReadOnlyList<ScriptableObject> LiveDraftInstances { get; }
Property Value
| Type | Description |
|---|---|
| IReadOnlyList<ScriptableObject> |
Routing
Declaration
public SerenityWizardByIdAssetBinding<UnityPlayerInputRoutingSettings> Routing { get; }
Property Value
| Type | Description |
|---|---|
| SerenityWizardByIdAssetBinding<UnityPlayerInputRoutingSettings> |
Targets
The four bindings' targets, in binding order, for the window's own OwnedTargets.
Declaration
public IEnumerable<SerenityWizardTargetAsset> Targets { get; }
Property Value
| Type | Description |
|---|---|
| IEnumerable<SerenityWizardTargetAsset> |
Methods
CaptureForReload()
Snapshots all four drafts' unsaved edits before a domain reload — see
Serenity.Global.Infrastructure.Editor.SerenityWizardDraftLifecycle`1.CaptureForReload for the full contract and for why
a window calls this from OnDisable and Dispose() only from OnDestroy.
Declaration
public void CaptureForReload()
ConsumeDefinitionSeed(Action<UnityPlayerInputSettingsDefinition>)
Call once per repaint. Returns the Definition's newly resolved existing asset when
Definition just reseeded from one, so the caller can reseed its own extra mirrored
state (the Player Prefab UnityEngine.GameObject, which the Definition's own
UnityEngine.InputSystem.PlayerInput field cannot be bound to directly) — never on an
unbind/rebind (a free Id, or a return to the same asset), which changes nothing on the Definition
draft for the caller to react to; see Serenity.Global.Infrastructure.Editor.SerenityWizardByIdAssetBinding`1.ConsumeSeed(System.Action{`0}).
Declaration
public UnityPlayerInputSettingsDefinition ConsumeDefinitionSeed(Action<UnityPlayerInputSettingsDefinition> seedNewDefinitionDefaults)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<UnityPlayerInputSettingsDefinition> | seedNewDefinitionDefaults |
Returns
| Type | Description |
|---|---|
| UnityPlayerInputSettingsDefinition |
ConsumeSubAssetSeeds(Action<UnityPlayerInputRoutingSettings>)
Call once per repaint alongside ConsumeDefinitionSeed(Action<UnityPlayerInputSettingsDefinition>) — Routing, Join Gate and Device Filter have no extra mirrored state of their own to reseed, so a plain consume is enough.
Declaration
public void ConsumeSubAssetSeeds(Action<UnityPlayerInputRoutingSettings> seedNewRoutingDefaults)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<UnityPlayerInputRoutingSettings> | seedNewRoutingDefaults |
Dispose()
Destroys all four scratch instances and clears every serialized mirror.
Declaration
public void Dispose()
EnsureAllBuilt(Action<UnityPlayerInputSettingsDefinition>, Action<UnityPlayerInputRoutingSettings>)
Builds every draft only when missing — call once on window open.
Declaration
public void EnsureAllBuilt(Action<UnityPlayerInputSettingsDefinition> seedNewDefinitionDefaults, Action<UnityPlayerInputRoutingSettings> seedNewRoutingDefaults)
Parameters
| Type | Name | Description |
|---|---|---|
| Action<UnityPlayerInputSettingsDefinition> | seedNewDefinitionDefaults | |
| Action<UnityPlayerInputRoutingSettings> | seedNewRoutingDefaults |
RetargetAll(string, string, string, string, string)
Re-resolves all four bindings from the shared output folder and each asset's own Id — call
from every place any of the five (folder + 4 ids) fields can change, never from OnEnable or
per repaint.
Declaration
public void RetargetAll(string folderPath, string definitionId, string routingId, string joinGateId, string deviceFilterId)
Parameters
| Type | Name | Description |
|---|---|---|
| string | folderPath | |
| string | definitionId | |
| string | routingId | |
| string | joinGateId | |
| string | deviceFilterId |
SimulateDomainReloadForTests()
Test seam: reproduces what a domain reload leaves behind for all four wrapped bindings.
Declaration
public void SimulateDomainReloadForTests()
SimulateScratchLosingDomainReloadForTests()
Test seam: the harsher reload, for all four wrapped bindings — see Serenity.Global.Infrastructure.Editor.SerenityWizardDraftLifecycle`1.SimulateScratchLosingDomainReloadForTests.
Declaration
public void SimulateScratchLosingDomainReloadForTests()