Input Error

Hello.

I’m trying to get that game on my phone now but I’m getting strange errors, when I’m trying to switch input methods:

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.

UnityEngine.Input.get_mousePosition () (at :0)

UnityEngine.UI.MultipleDisplayUtilities.GetMousePositionRelativeToMainDisplayResolution () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/UI/Core/MultipleDisplayUtilities.cs:40)

UnityEngine.EventSystems.BaseInput.get_mousePosition () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/BaseInput.cs:75)

UnityEngine.EventSystems.StandaloneInputModule.UpdateModule () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/InputModules/StandaloneInputModule.cs:175)

UnityEngine.EventSystems.EventSystem.TickModules () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:336)

UnityEngine.EventSystems.EventSystem.Update () (at Library/PackageCache/com.unity.ugui@1.0.0/Runtime/EventSystem/EventSystem.cs:351)

Could you help, please? Thank you

Hey, in Unity go to Edit > Project Settings > Player

Scroll down until you find “Active Input Handling” (under Configuration). Select “Both” (not “Input Manager (Old)” nor “Input System Package (New)”)

Then Restart Unity, build, and check if that works

Thank you very much.

1 Like

Hello. I tried to Build this game on my android and I got this msg:


How can I fix this. Thanks for your help!

Unity can’t find the Android NDK library. It’s likely that when you installed Unity, you didn’t include this in the setup:
The best approach would be to navigate to the Unity hub → Installs → next to your version there are 3 points/ Select them → Add Modules → Click on Android support → Select Android SDK&NDK tools.

I got it instaled. I also get

Thanks for help.

I’m sorry, I misunderstood your last reply since the topic was marked as solved…

If this is still an issue, it looks like you’ve installed the required packages in the Hub… You might consider uninstalling this version of Unity and re-installing it with the relevant options.

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.

Privacy & Terms