Components/ Input Prompt

samples

Attributes

samples
Attribute Description
InputActionName Name of input action to pick from input actions.
OverrideIconSprite InputPrompt displays icon according to InputActionName. You can override it with this.
OverrideIconText InputPrompt displays text according to InputActionName. You can override it with this.
MinSize Min width and height of the icon.
ButtonIf List 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.
HideIf List of InputIconControlScheme. Hide the InputPrompt automatically on desired input control schemes.

InputIconControlScheme

enum

  • KeyboardMouse
  • Xbox
  • PlayStation4
  • PlayStation5

InputDeviceManager

Has 2 responsiblities.

  • Detecting input scheme changes to automatically update InputPrompt icons and texts.
  • Connection between InputPrompt and InputIconDatabase.
inputdevicemanager

InputIconDatabase

Dictionaries of sprites for each control scheme.

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

inputicondatabase