What if you could make your game respond perfectly to any controller without rewriting your code?
Why New Input System overview in Unity? - Purpose & Use Cases
Imagine trying to handle player controls in a game by checking every key or button manually, writing separate code for keyboard, mouse, and gamepad inputs.
It feels like juggling many balls at once, and missing one means the game won't respond correctly.
This manual way is slow and confusing because you must write lots of code for each device.
It's easy to make mistakes, like forgetting to update input for a new controller or mixing input checks all over your code.
The New Input System in Unity organizes all input devices and actions in one place.
It lets you define controls once and use them everywhere, making your code cleaner and easier to manage.
if (Input.GetKeyDown(KeyCode.Space)) { Jump(); } if (Input.GetButtonDown("Fire1")) { Shoot(); }
playerInput.actions["Jump"].performed += ctx => Jump(); playerInput.actions["Shoot"].performed += ctx => Shoot();
It enables you to support many devices and complex input setups effortlessly, making your game feel smooth and responsive.
Think of a racing game where players can use keyboard, gamepad, or steering wheel without changing any code.
The New Input System handles all these inputs seamlessly.
Manual input handling is slow and error-prone.
The New Input System centralizes input management.
It makes supporting multiple devices easy and your code cleaner.