Canvas UI still references old Input system even when I install the new InputSystem

I installed the new InputSystem package, and created actions and code that can read the actions, according to several tutorial videos.

This all works fine, until I add a UI element (a Slider). Then, I suddenly get errors about some base UI code that still references the old system.

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.EventSystems.BaseInput.GetButtonDown

Apparently somewhere in the UI system the old InputSystem is still being referenced?

The only thing I can find about this in the QuickStart is a reference to InputSystemUIInputModule
But that’s not relevant, because I didn’t use the old StandAloneInputModule.

I have temporarily fixed it by allowing the old input system in the player settings, but that can’t be the answer! How do I use the new InputSystem with Unity UI?

OK never mind… I found that the InputSystemUIInputModule has to be placed on the EventSystem that gets generated by the canvas. I can’t delete this thread apparently :slight_smile:

Sounds like the UnityEngine.UI.Slider probably uses the old Input system… perhaps there is a new replacement for the UnityEngine.UI namespace that uses the new package? Haven’t gone down that path yet myself but it’s something to check into.

DON’T DELETE STUFF ! Jeez, let others find what they need to know!

6 Likes

When you add a canvas with event system, it doesn’t check if you are using the new input system. You have to manually click the EventSystem and click the button to generate the new InputSystemUIInputModule

Hopefully this will be fixed in a future update :slight_smile:

2 Likes

Thanks for coming back to post this; I’m sure you will save someone’s bacon in the future, perhaps mine!

1 Like

2 years later this problem is still there.
The “new” input system is probably 3 years old now.
Maybe Unity can consider making it either standard or at least ensures other module will adapt themselves.
The component can detect the project is using the new system as after finding this thread, I saw the error message on the EventSystem.
So why not automatically change it instead of having us click the button, or at least create a prompt when adding a Canvas.

1 Like