Cross Input Support UGUI

A component that provides keyboard and controller support for uGUI.

The Cross Input Support UGUI component's purpose is to provide keyboard and controller navigation support for Inventool's UI.

Requirements

For this to work properly, the steps below must be followed.

  1. Selector: the Selector UGUI must be set up somewhere in the scene.

  2. 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).

  3. You must have CrossInputSupportedWindowUGUI's in the scene. All of Inventool's uGUI windows already inherit from this class.

  4. All selectables (buttons or similar) that can be navigated to must have the Target Selectable component attached to them. The available uGUI UI options already have this set up.

An example of this is provided in the updated demo scenes.

Properties

Name
Description

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 Selectable Position

The placement of the initial selectable.

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.

Scripting Side

Cross Input Support UGUI

Last updated