In 4.1 we introduced some components to show the correct UI input prompts depending on the current control scheme.

image.png

image.png

These prompts will try to find a particular action in your game’s ActionMap and then, for a particular scheme, it’ll try to get the binding button sprite in a custom asset.

Creating an Input Scheme

<aside> ℹ️

This is just for information purposes, the template already contains pre-configured KeyboardAndMouse and Gamepad schemes

</aside>

The template includes 2 different input schemes: KeyboardAndMouse and Gamepad. These have been setup in the action assets (PlayerActions and UIActions)

image.png

The project also includes 2 InputSchemeHandles for each of these in HorrorEngine/ExampleContent/Input. Internally, these ScriptableObjects contain the name of the scheme they refer to from the list above (in the Action asset)

image.png

If you require any extra scheme, you can create one by adding it to the ActionAsset and then creating the related handle by right clicking on your project and selecting Create→Horror Engine→Input→Input Scheme. Remember to set the Name variable to the same name you used in the input actions asset.

image.png

Converting a sprite into an input action sprite

You can convert a static UI sprite into an adaptive input sprite by adding the component UIInputSchemeActionSpriteSetter.

image.png

This component has a couple of parameter: