Function: createUiNavigationEcsSystem()
createUiNavigationEcsSystem():
EcsSystem<[CanvasEcsComponent]>
Defined in: ui/systems/ui-navigation-system.ts:309
Creates a system that drives gamepad/keyboard focus navigation, the counterpart to pointer hover/click that lets a controller or keyboard reach and invoke the same interactables.
Every interactable: true UiInteractableEcsComponent - not disabled by
an ancestor CanvasGroupEcsComponent either, see resolveCanvasGroupState
- is automatically focus-navigable: on the tick a canvas's
navigateInputmagnitude first crossesnavigationThreshold, focus moves to the nearest candidate on the same canvas in the dominant direction (aUiFocusEcsComponenton the currently focused entity overrides that search on whichever sides it sets).submitInputraisesonInvokeon the focused element;cancelInputclears focus - register your own listener oncancelInput.triggerEventfor bespoke "close this menu" behavior.
Also resets every UiInteractableEcsComponent.wasInvokedThisFrame to
false at the start of its tick, before re-setting it for this tick's
submit invocation - the single point in the pipeline responsible for that
reset (see createUiInteractionEcsSystem, which only ever sets it true
for the pointer path and relies on this system having already cleared
it this tick). Always register this system - even on a canvas with no
submitInput/cancelInput/navigateInput configured - or
wasInvokedThisFrame never clears; createUiCanvas does this for you.
Must be registered after createUiRaycastEcsSystem (if present) and
before createUiInteractionEcsSystem.
Returns
EcsSystem<[CanvasEcsComponent]>
The UI navigation ECS system.