InvalidOperationException: You are trying to read Input using the UnityEngine.Input class

Why Unity throws this error when a script uses Input.GetAxis or GetKey with the Input System package active, the one-setting fix, and what is planned for Unity 6.7.

Status
Behaviour change in Unity 6.0 · Input
Old
UnityEngine.Input (legacy Input Manager)
New
Active Input Handling: Both, or the Input System package
Checked
2026-10-05, against the sources below

What changed

The legacy Input class is not obsolete, but it only works when the project lets it. If Project Settings > Player > Active Input Handling is set to Input System Package (New), every call such as Input.GetAxis or Input.GetKeyDown throws this InvalidOperationException at runtime.

The quick fix is to set Active Input Handling to Both and restart the Editor; old and new input then work side by side. The longer-term fix is to read input through the Input System package. Unity's planned changes move the Input System from an optional package to a built-in part of the engine in 6.7.

Before and after

Before
C#
float x = Input.GetAxis("Horizontal");
if (Input.GetKeyDown(KeyCode.Space)) Jump();
After
C#
// With the Input System package
using UnityEngine.InputSystem;

float x = (Keyboard.current.dKey.isPressed ? 1 : 0) - (Keyboard.current.aKey.isPressed ? 1 : 0);
if (Keyboard.current.spaceKey.wasPressedThisFrame) Jump();

Find every place it appears

This change needs a hand edit, but the Unity 6 Script Upgrade Checker points to every line it affects, together with the other changes for your target version.

Open this example in the checker

Questions

Is the legacy Input class deprecated?
Not today: it is not marked obsolete, and it works whenever Active Input Handling allows it. New Unity 6 projects simply default to the Input System only, which is why old tutorials throw this exception.
Do I have to restart Unity after changing Active Input Handling?
Yes. Unity asks to restart the Editor when you change the setting, because the input backends are chosen at startup. Save your scenes first.

Sources

Related Unity 6 changes

Every Unity 6.x change, by version