Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

I've got an error, but I don't even know where to start

I’m using unity, and this error is coming up:

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.
PlayerController.RetrieveMoveInput () (at Assets/Scripts/Controllers/PlayerController.cs:13)
Move.Update () (at Assets/Scripts/Capabilities/Move.cs:30)

It says this error comes up 999+ times, and I don’t even know what its talking about. I’ll post my scripts, and I’ll post a screenshot including my console and all my objects in my scene:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

enter image description here

Scripts: file:///Users/elliotsmyth/help%20me/Assets/Scripts/Controllers/AIController.cs
file:///Users/elliotsmyth/help%20me/Assets/Scripts/Controllers/InputController.cs
file:///Users/elliotsmyth/help%20me/Assets/Scripts/Controllers/PlayerController.cs
file:///Users/elliotsmyth/help%20me/Assets/Scripts/Checks/Ground.cs
file:///Users/elliotsmyth/help%20me/Assets/Scripts/Capabilities/Move.cs

>Solution :

It basically means you imported the InputSystem package into your project and have set the EditProject SettingsPlayerOther SettingsActive Input handling to only the new Input System.

However, somewhere in your code you are still trying to use the old Input class e.g.

Input.GetKeyDown(...)

or

Input.mousePosition

etc. which is no longer available due to your settings.

Solution:

  • You either want to find that usage of Input and replace it by something going through the new Input System (so basically your InputActions)

  • Or you adjust the EditProject SettingsPlayerOther SettingsActive Input handling to use a hybrid approach and allow both input systems simultaneously by setting it to Both

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading