UnityInputAdapter
Service: Input (Input)
Code: Runtime/GnosisEngine/Adapters/Unity/Input/UnityInputAdapter.cs
Unity-side Rewired integration for GnosisInputService: joystick assignment, disconnect notifications, optional global pause from the Rewired System player, and per-frame UI navigation snapshots for UnityUserInterfaceAdapter.
Dependencies
- Rewired — Expects
ReInputready (initializes inAwake/Startwith fallbacks). - Place this component alongside the Rewired Input Manager and register it as the
Inputadapter onUnityGnosisEngine.
Behaviour (summary)
- Manual joystick rules — Disables Rewired auto-assign where configured; assigns controllers to Player 1, Player 2, and System player ids (serialized).
- Assignments — Builds an assignments snapshot and calls
UpdateAssignmentson the input service; publishesFACT_INPUT_ASSIGNMENTS_CHANGEDwhen appropriate. - Disconnects —
ReInput.ControllerDisconnectedEvent→NotifyJoystickDisconnected. - Global pause — Optional: System player Pause action toggles engine run pause/resume (
enableGlobalPauseToggle, action / map category fields). - UI navigation sample — Tracks mouse position and Rewired UI actions to populate
_userInterfaceNavigationSnapshotconsumed by the UI adapter for pointer vs gamepad routing.
Execution order
[DefaultExecutionOrder(-100)] — Runs early so input state is stable before much gameplay/UI.
Editor
UnityInputAdapterEditor — Inspector wiring under Editor/GnosisEngine/Permanent/Services/Input/.
See also
- Input service —
EmitAction,configuration.inputs, events - UnityUserInterfaceAdapter — Consumes navigation snapshots
Last updated on