.. | ||
Icons | ||
.sample.json | ||
GamepadIconsExample.cs | ||
GamepadIconsExample.cs.meta | ||
Icons.meta | ||
README.md | ||
README.md.meta | ||
RebindActionUI.cs | ||
RebindActionUI.cs.meta | ||
RebindActionUIEditor.cs | ||
RebindActionUIEditor.cs.meta | ||
RebindingUISampleScene.unity | ||
RebindingUISampleScene.unity.meta | ||
RebindSaveLoad.cs | ||
RebindSaveLoad.cs.meta | ||
RebindUIPrefab.prefab | ||
RebindUIPrefab.prefab.meta | ||
RebindUISampleActions.inputactions | ||
RebindUISampleActions.inputactions.meta | ||
Unity.InputSystem.RebindingUI.asmdef | ||
Unity.InputSystem.RebindingUI.asmdef.meta |
This sample demonstrates how to use the Input System APIs to set up a rebinding UI. The main file is RebindActionUI which, aside from serving as an example, contains a reusable MonoBehaviour
component for composing rebinding UIs. The RebindUIPrefab contains a ready-made prefab that can be used as a simple drop-in setup for rebinding an individual action.
To demonstrate how to use images instead of textual display strings, take a look at GamepadIconsExample.
Finally, the RebindSaveLoad script demonstrates how to persist user rebinds in PlayerPrefs
and how to restore them from there.
The icons used in the sample are taken from Free Prompts Pack v4.0 created by, and made available to public domain by Nicolae Berbece. Icons are licensed under Creative Commons CC0.