Input Helper
Input Helper generates static wrappers for Unity's Input System, enabling strong-typed input action references. It provides integrated systems for input remapping with customizable UI components and dynamic input display that automatically adapts to the player's keyboard layout using TextMeshPro sprite assets.
com.cookie.input-helper 
Install via UPM
Add to Unity Package Manager using this URL
https://www.pkglnk.dev/input-helper.git README Markdown
Copy this to your project's README.md
## Installation
Add **Input Helper** to your Unity project via Package Manager:
1. Open **Window > Package Manager**
2. Click **+** > **Add package from git URL**
3. Enter:
```
https://www.pkglnk.dev/input-helper.git
```
[](https://www.pkglnk.dev/pkg/input-helper)Dependencies (1)
README
input-helper
Generates static wrappers for strong-referencing input actions from Unity's Input system, as well as provides a system for easily remapping and displaying inputs
Input wrapper:
- Open the project settings (Edit → Project settings)
- Set it up under the 'Input Wrapper' section
- Namespace - the namespace you want the wrappers to be under
- Folder - the folder you want the wrappers to be located in
- Create an input actions asset with 'Generate C# Class' enabled
- Add it to the list in the project settings
- Class Name - The name for the wrapper class
- Generated Name - The name for the C# class generated from the input actions asset
- Generated Namespace - The namespace for the C# class generated from the input actions asset
- Asset - The input actions asset itself
Input remapping:
- Add the
RebindingUI_Actioncomponent to a game object - Assign all the references in the inspector
- Assign the correct input action and label
Input display:
- Download the icon pack by Xelu
- Batch rename the ones under "Keyboard & Mouse/{colour scheme}" to remove
_Key_Darkor_Key_Light(Q_Key_Dark -> Q) - Import them into your project
- Make a TextMeshPro sprite asset from them called
ButtonIconsand place it underResources / Sprite Assets(by default, see TextMeshPro project settings)- Set all the icons' sprite mode to single
- Create a sprite atlas with "Allow Rotation" disabled
- Add all the icons to it
- Create a sprite asset from the atlas using TMProSpriteAtlas or manually (good luck)
- Add the
ActionDisplaycomponent to a game object - Assign the
TMP_Textreference to the target text object - Assign references to all the actions, in the same order as they are in the text
- Any {0}, {1}, (...) (the same as string.Format()) in the text are replaced with their corresponding action's key, matching the user's keyboard layout
No comments yet. Be the first!