Reputation: 96
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:
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
Upvotes: 0
Views: 124
Reputation: 90580
It basically means you imported the InputSystem
package into your project and have set the Edit
→ Project Settings
→ Player
→ Other Settings
→ Active 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 Edit
→ Project Settings
→ Player
→ Other Settings
→ Active Input handling
to use a hybrid approach and allow both input systems simultaneously by setting it to Both
Upvotes: 2