Problem: You are using (or trying to use) Unity’s New Input System but key presses, mouse clicks, or gamepad input are not detected. Your scripts may use InputAction, PlayerInput, or the Input System package API, and nothing fires when you press keys or move the mouse.
Quick fix: Ensure the Input System package is installed and the Active Input Handling project setting is set to Input System Package (New) or Both. Confirm your Input Action Asset is assigned and that a Player Input component (or manual enable of the asset) is present in the scene. Re-enable your action map and check for errors in the Console.
This guide walks through the most common causes and fixes so your New Input System works in the editor and in builds.
1. Confirm Input System package and Active Input Handling
The New Input System is a package. If it is not installed or the project is still using the old Input Manager only, your input code will not run.
- Open Window > Package Manager.
- In the list, find Input System. If it is not installed, click Install.
- Go to Edit > Project Settings > Player and under Other Settings find Active Input Handling.
- Set it to:
- Input System Package (New) if you use only the New Input System, or
- Both if you need the old
InputAPI and the new system.
- Unity will prompt to restart the editor. Restart so the change takes effect.
If Active Input Handling is set to Input Manager (Old) only, the New Input System APIs will not receive input.
2. Assign and enable your Input Action Asset
Input is driven by Input Action Assets (.inputactions). If the asset is not assigned or its action maps are not enabled, no callbacks will fire.
- Locate your Input Action Asset in the Project (e.g.
DefaultInputActions.inputactionsor a custom asset). - If you use Player Input on a GameObject:
- Select that object and in the Inspector find the Player Input component.
- Ensure Actions is set to your Input Action Asset.
- Set Behavior (e.g. Invoke Unity Events, Send Messages, or Script) as needed.
- Ensure the Default Map or the action map you need is enabled (e.g. "Player" or "UI").
- If you enable the asset from script:
- Call
yourInputActionAsset.Enable()(or enable a specific action map) after the asset is created or loaded. - Ensure you are not disabling it elsewhere or that the script is active and running.
- Call
Common mistake: Creating an Input Action Asset but never assigning it to a Player Input component or never calling Enable() in code, so the asset is never active.
3. Wire up actions to your code
How you read input depends on how you configured the asset and Player Input.
- Invoke Unity Events: In the Player Input component, under the action map (e.g. "Player"), assign the event for each action (e.g. "Move", "Fire") to a method in your script. If the event is not connected, nothing will happen when you press the key.
- Send Messages / Broadcast Messages: Your script must implement a method with the expected name (e.g.
OnMove,OnFire) on the same GameObject (or children) that has the Player Input. Method names are case-sensitive. - C# script with callbacks: If you use
action.performed += OnPerformed, ensure you have subscribed after the action (or asset) is created and that you enable the action or its map. Unsubscribe inOnDestroyto avoid errors.
If you use generated C# class from the .inputactions asset, instantiate the class, call Enable() on the instance or the desired action map, then read from the generated fields (e.g. playerActions.Player.Move.ReadValue<Vector2>()). Ensure that instance is the one you use at runtime and that it is not disposed too early.
4. Check for Console errors
Input may be suppressed or fail silently if there are errors elsewhere.
- Open Window > General > Console.
- Look for errors related to Input System, PlayerInput, or InputAction.
- Fix any NullReferenceException (e.g. missing reference to the Input Action Asset or to an action).
- If you see errors about multiple Input System packages or conflicting backends, ensure only one Input System package version is installed and that Active Input Handling matches your usage.
Resolving these often restores input.
5. Build and runtime (standalone / device)
If input works in the Editor but not in a build or on device:
- Standalone: Ensure the same Input Action Asset is included in the build (it should be if it is in a Resources folder or referenced in a scene). Check that Active Input Handling is set correctly in Project Settings; it applies to builds too.
- Mobile / touch: If you use touch or on-screen controls, ensure the action map and bindings include Touch or the correct control scheme. Test with the device simulator or on a real device.
- Gamepad: Confirm the gamepad is recognized by the OS and that the correct control scheme (e.g. "Gamepad") is selected or active. You can switch control schemes in code or via the Player Input component.
6. Verification checklist
- [ ] Input System package is installed (Package Manager).
- [ ] Active Input Handling is Input System Package (New) or Both (Project Settings > Player), and the editor was restarted.
- [ ] Input Action Asset is assigned in Player Input (or enabled in code).
- [ ] The correct action map is enabled and the actions you use have bindings (keyboard/mouse/gamepad).
- [ ] Events or callbacks are wired (Unity Events, Send Messages, or C# callbacks) and the script is active.
- [ ] No Console errors related to Input System or null references.
After changing settings, enter Play mode and press the keys or use the controls you configured. If input still fails, double-check the action names and binding paths in the .inputactions asset (double-click it to open the Input Actions window).
Related issues and links
- For legacy Input Manager (
Input.GetKey, etc.) not working, see Unity Console Errors Not Showing to ensure you are not missing script errors. - For general Unity scripting and setup, see our Unity Game Development Guide.
- Official docs: Unity Input System.
Bookmark this page for quick reference when debugging input. If you are still stuck, check the Unity Forums or our other help articles for engine and scripting fixes.