Introducing the new Input System
The Input System is available in preview for Unity 2019.1 and later. This new system focuses on ease of use and consistency across devices and platforms. Install it via the Package Manager, give it a try, and join us on the forums with any feedback you have.
Unity’s current built-in input management system was designed before we supported the many platforms and devices that we do today. Over the years, we realized that it wasn’t very easy to use and, occasionally, it even struggled with simple situations — like plugging in a controller after the executable was launched. That’s why we have been working on something new; a complete rewrite. (P.S. There is currently no timeline for the removal of the current Input Manager.)
The Input System is built from the ground up with ease of use, consistency across platforms, and flexibility in mind. Today, we’d like to invite you to try it out and give us feedback ahead of its planned release alongside Unity 2020.1. The minimum requirement for using the system is and will remain Unity 2019.1.
Ease of use
The Input System’s new workflow is designed around a simple interface that works for all platforms, and can easily be extended to support custom or future devices.
The Action focused workflow is designed to separate the logical input your game code responds to from the physical actions the user takes. You can define Actions in the dedicated editor (or in a script) and bind them to both abstract and concrete inputs, such as the primary action of a Device or the left mouse button.
Using the Input System’s PlayerInput component, you can easily link input actions to a GameObject and script action responses. This will work with any number of players in the game.
Get callbacks when actions are performed:
public void OnMove(InputValue value)
m_Move = value.Get<Vector2>();
public void OnLook(InputValue value)
m_Look = value.Get<Vector2>();
public void OnFire()
The new system supports an unlimited number and mix of devices. It also allows for notifications on device changes so you can properly support new devices at runtime.
Note that console development requires installing additional packages. These can be obtained on each dedicated console forum where you would traditionally retrieve the Unity installer. See this list of Supported Input Devices for more details.
The Input System is developed to be extensible, with APIs allowing you to support new Devices and to design your own Interactions, Input Processors, or even custom Binding setups. And in case you want to take a look under the hood, the package comes with complete source code and is developed on GitHub.
Getting started with the Input System
Using Unity 2019.1 or later, open the Package Manager and enable Show Preview Packages in the Advanced menu. You will find the Input System package in the list of All Packages. Click Install in the upper right of the details panel. The current version is 1.0-preview. We’re working on getting the package verified for Unity 2020.1 and we’ll be adding new features afterwards.
You may see a popup warning letting you know that you need to enable the new Input System backend. Click yes and restart the editor and you’ll be ready to go.
Be sure to check out our Quick start guide, take a look at the samples that are installable through the Package Manager, and join us on the forums to give us your feedback. And in case you’d like to follow the active development, check out our GitHub repo.