Creating and Input Asset in Unity
Objective: Learn what an Input Asset is and how to create it.
Table of Contents
· What is an Input Asset?
· How to create an Input asset?
To use input assets, you must have installed the Unity Input System Package. The quick installation guide is available here.
What is an Input Asset?
An asset that holds Input Actions, Bindings, and Control Schemes.
- Input Actions are part of an Action Map, which represents an object or entity in your project that the actions are associated with. In this example, the Action Map is a Dog, meaning all actions correspond to the dog object, including bark, walk, run, and bite.
- The bindings are different keys, buttons, or means to activate the actions.
- The Control Schemes help you organize input settings for different types of devices, like keyboards, gamepads, or touchscreens. They allow your game to switch between input devices seamlessly.
How to create an Input asset?
In your Project Folder, create a folder for Input. Then, go to Create →Input Actions
Now you have an asset called New Controls, to access it click on Open.
The Input Asset features an Auto-Save option to keep all your inputs secure and up to date. However, I don’t recommend this as Unity will need to recompile every time the Auto-Save is active.
In my upcoming documentation, I will go into detail about how to create inputs using this asset, and we’ll be diving into scripting as well
Hope this was helpful! I’m looking for opportunities in the video game industry, check out my portfolio!