In the third installment of the Unity for Software Engineers series, we cover Unity’s Input System from basic principles.
Handling player input will likely be among the first game systems you implement. Unity Technologies unveiled a new Input System in 2019 intended to replace their previous system. While the new Input System allows building on more idiomatic Unity patterns, it can also be more challenging for a newcomer to pick these up. This is especially true because the Input System leans on configurable assets and emphasizes Editor usage. The Input System’s Quick start guide is helpful, but only once the Input System and Unity Events’ basic concepts are understood.
Much of the newer pieces of the Unity Engine are being released as encapsulated packages. Unity packages are installed from the Unity Package Manager UI in the editor (open it in Window > Package Manager). The package updates a manifest.json
file that has a "dependencies"
entry identical to a package.json
. The
package manager resolves dependencies and writes to a package-lock.json
. You can install the Unity Input System from the Package manager, which adds a dependency on com.unity.inputsystem
in your manifest.
The Input System makes it easy to create player-configurable cross-platform game controls through assets known as Input…