🤔 Unity, huh, how?

🤔

Input System: Input handling

InvalidOperationException: You are trying to read Input using the UnityEngine.Input class, but you have switched active Input handling to Input System package in Player Settings.

Input code differs between the built-in Input Manager and the Input System, and changes are required.

warning

As of Unity 6.1 the Input System is the default method of input handling.

Resolution

Check the stack trace to determine the origin of the error. Then choose one:

The error was thrown from Unity UI

Replace the StandaloneInputModule with an InputSystemUIInputModule . This can be found on the Event System GameObject found in the scene, and there may be an upgrade button on the component.

If you do not have an Event System, create one via GameObjectUIEvent System, then upgrade it.

The error was thrown from user code

Choose one:

Migrate your code to the Input System

See migration from the old input system for information on how to upgrade your own code, or follow a tutorial like this one to learn how to use the Input System generally.

Revert to the old Input Manager

If you switched to the Input System and want to switch back to the old Input Manager.

  1. Go to EditProject SettingsPlayerOther SettingsConfiguration.
  2. From Active Input Handling select Input Manager (Old).
Remove the Input System package (optional).
  1. Go to WindowPackage Manager.
  2. Go to the Packages: In Project view.
  3. Select the Input System package.
  4. Remove the package via the button in the bottom right.

Enable both methods of input handling

If you're following a tutorial and don't mind using either system, your project can support both.

  1. Go to EditProject SettingsPlayerOther SettingsConfiguration.
  2. From Active Input Handling select Both.

This method isn't recommended for long term projects.