Unity New Input System — Overview

Jack Leavey
3 min readJul 6, 2022

--

Control schemes have changed over the years, and Unity is no different!

Unity is transitioning into new input system that utilizes a built in GUI for much of the action mapping as opposed to the legacy process of manually mapping in C#.

While this system will eventually become default setting and will ship with Unity, for now it must be downloaded from the package manager and implemented manually.

You can find the Input System in the Package Manager.

This package allows you to create input maps using a new window that can be referenced and swapped in code. The main benefit of this system versus the legacy is that you can quickly create several different control schemes and change them in-game with ease. In games that feature character swapping, vehicles, or even move-set changes for different weapons can benefit from isolating these various input presets to avoid overlap and potential issues.

You can create a new action map the same way you create a script or asset in the Project window.

This is one method for creating a new action map, but you can use the “+” icon as well.

Double clicking on this new action map will open the editor window for action maps

The Action Mapping Window.

I will cover this in debt as we explore each piece, but here’s a simple overview of the system.

The action maps tab holds all of your various control schemes. For a game like Grand Theft Auto you would likely have a “Player”, “Car”, “Boat” and “Plane” action map. This are complete control schemes that can be swapped between.

Each map is a unique control scheme

In the center column is the Actions tab. This column will hold unique information for each of the action maps you create. Walking, running, jumping, attack, blocking, etc.

Each action is a specific command like walking.

The final tab shows any and all modifier on the currently selected action. This allows you to set parameters for when the action should occur (like holding down a button to charge up an attack, etc).

Modifiers and parameters of the currently selected action are shown here.

Tomorrow we will take a look at creating a simple walking action map!

--

--

Jack Leavey
Jack Leavey

Written by Jack Leavey

I am a software engineer with years of experience branching into game development, specifically in Unity. Follow along for guides on creating game mechanics!

No responses yet