Cross Input Support
A component that provides keyboard and controller support.
Last updated
A component that provides keyboard and controller support.
Last updated
The Cross Input Support component's purpose is to provide keyboard and controller navigation support for Inventool's UI.
For this to work properly, the steps below must be followed.
A UI document with a visual element named 'Selector,' which is used as the visual graphic that selects UI elements should be a part of the same object.
Since the Cross Input Support component requires input, it is best to set the component to the player GameObject. The input handler should have actions named 'Confirm' (confirm selection), 'Cancel' (cancel selection or go back), 'MenuMove' (move up, down, left, or right), 'Deselect' (hide selector), 'Tab' (no general purpose, but can be used to exit the window or switch windows).
You must have CrossInputSupportedWindow
's in the scene. All of Inventool's UI Toolkit windows already inherit from this class.
An example of this is provided in the updated demo scenes.
Player Map
The player input map name. When the Inventool window is closed, the Player Input component's active map will be set to the one with the name set here.
Menu Map
The menu input map name. When the Inventool window is opened, the Player Input component's active map will be set to the one with the name set here.
Initial Focusable Position
The placement of the initial focusable.
Scrolling Sensitivity
The scrolling sensitivity used when locked on a scroller.
On Tab
A callback for when the tab button is pressed.
On Cancel
A callback for when the cancel button is pressed.
On Confirm
A callback for when the confirm button is pressed.
On Move
A callback for when a move button is pressed.