Troubleshooting
About 10 minutes, only if something failed.
Learning objectives
- Match a symptom to one cause
- Fix Active Input Handling, project-wide actions, and script setup without guessing
Work top to bottom. Change one thing, then retest in Play mode.
Quick checks
| Symptom | First thing to verify |
|---|---|
| Nothing happens when you press keys | You are in Play mode and the Game view has focus |
InputAction will not compile | using UnityEngine.InputSystem; is at the top of the script |
FindAction returns null | Project-wide asset is assigned; the path is "Player/Move" |
| Cube sits still | PlayerMover is on Player and enabled; moveSpeed is not 0 |
| UI clicks do nothing | EventSystem uses Input System UI Input Module |
Input.GetAxis / Input.GetKey errors | Active Input Handling is New; delete that legacy code |
Editor did not restart after Active Input Handling
Edit > Project Settings > Player > Other Settings > Configuration > Active Input Handling only applies after an Editor restart.
- Set it to Input System Package (New) again.
- Close Project Settings.
- If Unity did not prompt, close the Editor from File > Exit (or the window close button).
- Reopen the project from Hub.
- Recheck the dropdown.
You should see: Input System Package (New) is still selected after the restart.
InputSystem.actions is null, or FindAction returns null
InputSystem.actions is the project-wide Action Asset. If none is assigned, it is null. If the name is wrong, FindAction returns null and PlayerMover bails out in Update.
- Open Edit > Project Settings > Input System Package.
- If there is no asset, select Create and assign a default project-wide Action Asset.
- In
PlayerMover, useFindAction("Player/Move"), not"Move"and not"player/move". - Open the
.inputactionsasset and confirm the map is named Player and the action is named Move.
You should see: InputSystem.actions is assigned, and a temporary Debug.Log(moveAction) in Start is not null. Remove the log after it works.
Cube does not move
Run these in order:
- Confirm you pressed Play. Edit mode will not run this movement.
- Click the Game view so keyboard focus is not in the Scene view, Console, or a text field.
- Select
Player. Confirm Player Mover is present and enabled. - Confirm Move Speed is greater than
0. - Confirm you did not also leave a disabled script as the only component — the enabled one must be
PlayerMover(page 05) orPlayerMoverEvents(page 06), not both enabled. - Search your scripts for
Input.GetAxisorInput.GetKey. Delete those calls. They are the old Input Manager and fail when Active Input Handling is New. - Add this inside
UpdateafterReadValue, play, and hold W:
Debug.Log(move);
(0.00, 0.00)while holding W means the action is not receiving keyboard input (wrong map, Game view unfocused, or backends not enabled).(0.00, 1.00)means input works and the transform code is the problem (you are translating along the wrong axes, or the camera is looking so the motion is hard to see).
CS0246: InputAction could not be found
The compiler cannot see the Input System types.
- Confirm the first two lines of the script are:
using UnityEngine;
using UnityEngine.InputSystem;
- Confirm Window > Package Manager shows Input System installed.
- Confirm Active Input Handling is Input System Package (New) or Both, then restart the Editor.
- Wait for the script to recompile.
InputAction lives in UnityEngine.InputSystem, not in UnityEngine.
UI / EventSystem broken after switching
When Active Input Handling is New or Both, uGUI needs Input System UI Input Module. Standalone Input Module talks to the old Input Manager.
- Select EventSystem in the Hierarchy (Unity creates it when you add a Canvas).
- If the Inspector shows Standalone Input Module, remove it.
- Add Component > Input System UI Input Module.
- If Unity shows a button to replace the old module, use that button.
This starter does not need a Canvas. Only do this if UI clicks or Submit stopped working.
Both vs New, leftover Input Manager code
| Active Input Handling | Input.GetKey / Input.GetAxis | Input System actions |
|---|---|---|
| Input Manager (Old) | Works | Does not |
| Input System Package (New) | Does not | Works |
| Both | Works | Works |
This course is New. If a tutorial or autocomplete inserts Input.GetAxis("Horizontal"), do not keep it. Both exists so an old project can migrate one script at a time. It also lets students "fix" a broken script by turning the old API back on. Leave Both off unless your instructor says otherwise.
Defines you may see in code:
ENABLE_INPUT_SYSTEMwhen the new backends are onENABLE_LEGACY_INPUT_MANAGERwhen the old backends are on
Package missing after a Hub template without Keep Project Settings
If you created this project from a custom course template and Package Manager shows Input System but Active Input Handling is still Input Manager (Old), the template was saved with Keep Project Settings off.
That is an instructor fix. See Save as a course template. Until it is fixed:
- Set Active Input Handling to Input System Package (New) yourself.
- Restart the Editor.
- Assign the project-wide Action Asset if it is missing.
Player Input events never fire
- Behavior must be Invoke Unity Events.
- Default Map must be Player.
- The event function must be
public void OnMove(InputAction.CallbackContext context)(orOnJumpwith the same signature). - The dropdown must show PlayerMoverEvents.OnMove, not a
MonoBehaviourmethod with no arguments. - Disable
PlayerMoverso it is not competing, and do not readInputSystem.actionsfrom the same object.
Jump logs three times if you skip if (context.performed).
Checkpoint
You can continue when:
- Play mode moves the cube with WASD or arrows
- The Console has no compile errors
- Active Input Handling is Input System Package (New)