Skip to Content

UnityUserInterfaceAdapter

Service: UserInterface (UserInterface or alias UI)
Code: Runtime/GnosisEngine/Adapters/Unity/UIService/UnityUserInterfaceAdapter.cs and partials:

  • UnityUserInterfaceAdapter.Navigation.cs — Gamepad / keyboard navigation grid
  • UnityUserInterfaceAdapter.Input.cs — Input mode, Rewired / pointer integration
  • UnityUserInterfaceAdapter.ScreenManagement.cs — View show/hide, hierarchy
  • UnityUserInterfaceAdapter.FocusHighlight.cs — Focus ring sprite
  • UnityUserInterfaceAdapter.Tooltips.cs — Tooltip behaviour
  • UnityUserInterfaceAdapter.Diagnostics.cs — Debug / inspector helpers
  • UnityUserInterfaceAdapter.Constants.cs — Shared constants

Implements IInputModeSource and IViewStateSource so subsystems expose current input mode and view id without sharing large field sets.

Serialized view model

UserInterfaceViewviewId, optional nested subviews (runtime ids use dot notation), viewObjects list toggled together when a view is active. startupViewId selects the first screen; empty falls back to heuristics (see Start / screen management partial).

Input modes & cursor

Fields control mouse idle hide, hide cursor with gamepad focus, gamepad vs pointer behaviour. Works with UnityInputAdapter navigation snapshots.

Binding fallback

If UnityGnosisEngine did not bind the adapter in Awake, Start attempts GetService("UserInterface") or "UI" and BindService once so the first view can still initialize.

Execution order

[DefaultExecutionOrder(10)] — Runs after default input (-100) so snapshots and mode are consistent.

Singleton

Instance — Single active adapter in Awake.

View transitions

Screen transition execution is handled by GnosisViewTransitionCoordinator and effect components in the transition coordinator prefab, while UI service requests come from the same UI stack used by this adapter.

Use the transition id catalog here:

See also

Last updated on