Route input remaps through state commits
This commit is contained in:
parent
d0cefe8d63
commit
7a979e55d3
3 changed files with 11 additions and 6 deletions
Binary file not shown.
|
|
@ -502,6 +502,14 @@ public class InputDisplayLayout : MonoBehaviour
|
|||
ActionGameManager.QueueRuntimePlayerSettingsCommit();
|
||||
}
|
||||
|
||||
private void CommitBindingOverride(InputAction action, InputBinding binding, string inputSystemPath)
|
||||
{
|
||||
binding.overridePath = inputSystemPath;
|
||||
action.ApplyBindingOverride(binding);
|
||||
ActionGameManager.RuntimePlayerSettings.InputSettings.InputActionMap[(action.name, action.GetBindingIndex(binding))] = inputSystemPath;
|
||||
QueueRuntimeInputSettingsCommit();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
foreach(var buttonMapping in _buttonMappings)
|
||||
|
|
@ -525,11 +533,7 @@ public class InputDisplayLayout : MonoBehaviour
|
|||
}
|
||||
else
|
||||
{
|
||||
_dragAction.Binding.overridePath = _previewButton.Button.InputSystemPath;
|
||||
_dragAction.Action.ApplyBindingOverride(_dragAction.Binding);
|
||||
ActionGameManager.RuntimePlayerSettings.InputSettings.InputActionMap[(_dragAction.Action.name,
|
||||
_dragAction.Action.GetBindingIndex(_dragAction.Binding))] = _previewButton.Button.InputSystemPath;
|
||||
// TODO: Assign New Binding
|
||||
CommitBindingOverride(_dragAction.Action, _dragAction.Binding, _previewButton.Button.InputSystemPath);
|
||||
}
|
||||
|
||||
foreach(var action in _actionMappings)
|
||||
|
|
|
|||
|
|
@ -76,7 +76,8 @@ legacy catalog cache, and legacy UI paths should be migration-only or deleted.
|
|||
projection is not portable state authority. Aetheria has its own remapping UI
|
||||
that calls Unity's InputSystem at the binding/action layer; Unity's generated
|
||||
`AetheriaInput` class is the edge consumer of typed binding overrides, not
|
||||
the durable owner.
|
||||
the durable owner. Binding drag/drop and action-bar remapping both queue the
|
||||
same typed player-settings commit after mutating the runtime projection.
|
||||
- `Aetheria.State` now exposes typed node put/get ports for run state, zone
|
||||
state, and entity snapshots. The state smoke writes a run referencing a zone,
|
||||
a zone referencing an entity snapshot, and an entity snapshot carrying
|
||||
|
|
|
|||
Loading…
Reference in a new issue