How to use different EventSystems and InputModules?

I am making a developper console using Unity UI.

Sometimes the console can be activated in a scene where there is no EventSystem, and sometimes it can be activated in a scene where there is an EventSystem. That means that my dev console must have its own EventSystem in case the scene doesn’t already have one, but it must also be able to go back to the scene’s EventSystem when it is inactive

So how do I tell the UI system to “use this specific EventSystem with this specific InputModule now”?

The event system is nothing more that an abstraction / manager for the Unity INPUT namespace, to handle incoming events.

If your console has a dependency on the EventSystem, then it will need to be in every scene (or a master scene) to use it. If not, then there is no issue as it won’t matter whether it’s there or not. So what is your issue?

Either you use the EventSystem (and it’s inputmodules) or you use the Input namespace directly.

@SimonDarksideJ
my problem was that I wasn’t able to make InputFields and ScrollBars work without an event system. Calling Focus and Select methods on them didn’t do anything

But I see what you’re saying now. I could make my own iputfields and scroll bars that work with Input.GetKeyDown() and Input.Mouse events? Seems like a better idea than trying to manage different InputModules and potentially cause problems. Thanks

2 Likes