Unity’s New Input System: Setup

Ryan McCoach
2 min readFeb 22, 2025

--

The New Input System in Unity provides a more flexible, scalable, and configurable way to handle player input compared to the legacy Input class. It supports multiple input devices (keyboard, mouse, gamepad, touch, VR controllers) with a unified approach. Before installing the new Input System it requires Unity 2019.4+ and the .NET 4 runtime.

Install the new Input System

  1. Select Windows > Package Manager
  2. Select Input System > Install
  3. A warning message will appear. Select ‘YES’ to enable the correct backends to use the new Input System. This will restart the Unity editor.

Setting Up Both New & Old Input Systems

In Unity, the scripting backend determines how your C# code is compiled and executed on different platforms. Unity offers two main scripting backends:

Mono (Just-In-Time Compilation — JIT)

  • Uses the Mono runtime, an open-source implementation of Microsoft’s .NET framework.
  • Compiles C# code Just-In-Time (JIT), meaning code is compiled at runtime.
  • Faster iteration times, making it ideal for development and debugging.
  • Supports managed code debugging, including features like breakpoints and stack traces.
  • Used mainly for editor, standalone Windows/macOS builds, and some mobile platforms.

IL2CPP (Ahead-Of-Time Compilation — AOT)

  • Converts C# code into intermediate C++ code, which is then compiled into native machine code.
  • Uses Ahead-Of-Time (AOT) compilation, meaning everything is compiled before runtime.
  • Improves performance and security since there’s no JIT overhead and no direct access to IL code.
  • Used for iOS, consoles (PS/Xbox/Switch), and WebGL, where JIT compilation is not allowed.
  • More optimized but takes longer to build, making iteration slower.

Analogy: Think of IL code as a recipe (instructions) that a chef (runtime) follows:

  • Mono (JIT): The chef reads the recipe and cooks the dish while following instructions.
  • IL2CPP (AOT): The recipe is converted into a fully pre-cooked meal, so no instructions are needed at runtime.

--

--

Responses (1)