Install Unity Input System
1. Introduction
This guide provides a comprehensive step-by-step process for installing and configuring Unity’s new Input System, along with code integration and performance optimizations for mobile platforms.
2. Installation
-
Open Package Manager:
Go to Window > Package Manager in Unity.
-
Search and Install:
Locate Input System via the search bar and click Install.
!!! For Unity 6 Input System Problems with 1.13.1 and 1.14.0 !!!
Use for Unity 6 1.13.0 and lower and for Unity 2022/21 use the normal 1.7.0
If you cant see the Version in the package manager History: Install a specific version of Unity Input System:
Click -> + > Add package by name…
Enter -> Name: com.unity.inputsystem -> Version: 1.13.0

3. Enabling the Input System
-
Open Project Settings:
Navigate to Edit > Project Settings > Player.
-
Set Active Input Handling:
Select Input System Package (New) or Both if legacy support is needed, then restart Unity if prompted.

4. Creating & Configuring Input Actions
-
Create Input Actions Asset:
Right-click in the Project window and select Create > Input Actions to generate a new asset.
-
Configure Actions and Bindings:
Open the asset and add actions (e.g., "Move", "Jump") with appropriate bindings for devices like Gamepad, Keyboard, and Touch.
-
Activate Input Actions:
In the asset's Inspector, click Assign as the Project-wide Input Actions so the project recognizes it as the central input asset.
-
Generate C# Class (Optional):
Use the Generate C# Class option in the asset settings to create a class for easier code reference.

5. Integrating in Code
There are two approaches:
- Event-based: Use callback methods for input events.
- Polling-based: Query input in the
Update()
method – only process input when changes occur to reduce overhead.
6. Sample Code
The following example demonstrates creating an Input Action at runtime, binding it for both Gamepad and Touchscreen, and processing input with minimal overhead.
using UnityEngine;
using UnityEngine.InputSystem;
// Reads and stores input values using Unity's new Input System.
// Attach this script to a player object and hook it up to input actions.
public class PlayerInputReader : MonoBehaviour
{
// Current movement input (e.g. from joystick, WASD, or touch).
public Vector2 MoveInput { get; private set; }
// True while the jump button is being pressed.
public bool JumpPressed { get; private set; }
// True while the sprint button is being held.
public bool SprintPressed { get; private set; }
// Called when movement input is performed or canceled.
// Reads a Vector2 value representing direction and intensity.
public void OnMove(InputAction.CallbackContext context)
{
if (context.performed || context.canceled)
{
MoveInput = context.ReadValue();
}
}
// Called when jump input starts or is released.
// Sets JumpPressed to true on press, false on release.
public void OnJump(InputAction.CallbackContext context)
{
if (context.started)
{
JumpPressed = true;
}
else if (context.canceled)
{
JumpPressed = false;
}
}
// Called when sprint input changes.
// Uses ReadValueAsButton to check if the input is pressed.
public void OnSprint(InputAction.CallbackContext context)
{
SprintPressed = context.ReadValueAsButton();
}
}
7. Performance Considerations
- Lazy Loading & Event-based Processing: Prefer event-driven input handling to avoid constant polling in
Update()
. - GC Avoidance: Prevent frequent allocations by processing input only when necessary.