Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unity: Conflict between new InputSystem and old EventSystem

Tags:

unity3d

When using the new InputSystem. If I add a Canvas component to my Scene it brings automatically the old EventSystem and I see this error in my console:

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 <213e6bf8f2dd495fbd693e6ce506136b>:0)
UnityEngine.UI.MultipleDisplayUtilities.GetMousePositionRelativeToMainDisplayResolution () (at /Applications/Unity/Hub/Editor/2020.1.14f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/UI/Core/MultipleDisplayUtilities.cs:40)
UnityEngine.EventSystems.BaseInput.get_mousePosition () (at /Applications/Unity/Hub/Editor/2020.1.14f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/InputModules/BaseInput.cs:75)
UnityEngine.EventSystems.StandaloneInputModule.UpdateModule () (at /Applications/Unity/Hub/Editor/2020.1.14f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/InputModules/StandaloneInputModule.cs:175)
UnityEngine.EventSystems.EventSystem.TickModules () (at /Applications/Unity/Hub/Editor/2020.1.14f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:328)
UnityEngine.EventSystems.EventSystem.Update () (at /Applications/Unity/Hub/Editor/2020.1.14f1/Unity.app/Contents/Resources/PackageManager/BuiltInPackages/com.unity.ugui/Runtime/EventSystem/EventSystem.cs:343)
like image 612
fguillen Avatar asked Nov 26 '20 18:11

fguillen


1 Answers

Looks like the solution was in an automatic update button in the Inspector:

enter image description here

like image 67
fguillen Avatar answered Sep 28 '22 05:09

fguillen