Input

Attributes

Input Prompt Attributes

AttributeDescription
InputActionNameName of input action to pick from input actions.
OverrideIconSpriteInputPrompt displays icon according to InputActionName. You can override it with this.
OverrideIconTextInputPrompt displays text according to InputActionName. You can override it with this.
MinSizeMin width and height of the icon.
ButtonIfList of InputIconControlScheme. If the list contains KeyboardMouse, the InputPrompt will automatically switch to being interactable so it can be clicked with mouse. However, when switching to a gamepad, it will no longer be interactable, ensuring that auto-navigation ignores it. This prevents navigation with d-pad from selecting the InputPrompt, which is typically not desirable.
HideIfList of InputIconControlScheme. Hide the InputPrompt automatically on desired input control schemes.
PlayerIndexIndex of the player this InputPrompt should display input for. Used in multiplayer scenarios to show different player inputs.
HideIfPlayerIndexMissingIf true, hides the InputPrompt when the specified PlayerIndex doesn't have an active PlayerInput. Useful for dynamic multiplayer UI.

InputIconControlScheme

enum

  • KeyboardMouse
  • Xbox
  • PlayStation4
  • PlayStation5

Integration with InputDeviceManager

InputPrompt works closely with InputDeviceManager which has 2 responsibilities:

  • Detecting input scheme changes to automatically update InputPrompt icons and texts.
  • Connection between InputPrompt and InputIconDatabase.
  • Managing player input registration and control scheme tracking for multiplayer scenarios.

The InputPrompt automatically subscribes to InputDeviceManager events to update its display when players join/leave or when control schemes change.

Input Device Manager

Integration with LunaUIManager

InputPrompt integrates with LunaUIManager to access the InputIconDatabase. The LunaUIManager provides the IconDatabase property which contains the input icons for different control schemes.

When InputPrompt needs to display an icon, it queries the LunaUIManager's IconDatabase to get the appropriate sprite and text for the current control scheme.

InputIconDatabase

Dictionaries of sprites for each control scheme.

Icons used: https://www.kenney.nl/assets/input-prompts

Input Icon Database

Settings

Theme

Light

Contrast

Material

Dark

Dim

Material Dark

System

Sidebar(Light & Contrast only)

Light
Dark

Font Family

DM Sans

Wix

Inclusive Sans

AR One Sans

Direction

LTR
RTL