Day 138 With GDHQ: Input Assets and Action Maps

Nikolai Nelson
2 min readJan 18, 2024

--

“They who control the input. . .”

Input in Unity’s new system is handled as an asset, created under the hierarchy like any other.

Double-clicking this asset will open a new window specifically for inputs, which can be snapped wherever you like it. The action maps that store inputs are created within this window.

A single input asset may contain multiple action maps, though only one may be active at any time.

This allows for the easy creation of context sensitive input, such as making the player’s movement controls navigate a menu while it’s open instead.

The third layer of this system is the actions themselves, which represent the various things the player can do, move, attack, etc.

Each action can be host to multiple bindings, allowing for easy setup if multiple controls should do the same thing, such as “space” or left click both firing.

Actions also offer simple support for input combinations, via composite bindings with one or two modifiers.

--

--