Use both UI Toolkit and Unity UI system

I have a situation where i have to use the UI Toolkit and UI system in a same scene. But because of the event system i can able to interact with any of the UI. Is it possible to use both UI Toolkit and UI System in the same scene

Hi ajithkumaran000.

Yes you can use both UI systems at the same time. The EventSystem in your scene will manage events for both UI systems when present. If there is no EventSystem, then only UI Toolkit content will work. I hope this helps!

But currently one of my UI system work at a time. My UI Toolkit is a singleton that loads in all the scenes, and I have a scene where I’m using Unity UI so when I disable the EventSystem in UI only the UI Toolkit works, when I disable the EventSystem in the UI Toolkit then the UI works, when disable both EventSystem UI Toolkit works same happens both EventSystem enable also. The UI Toolkit is a prefab that loads in all the scenes. Is there any solutions for that ?

You should only need the one event system for both, and not have to disable one or the other. It’s the kind of component to persist throughout the lifetime of the application with a DontDestroyOnLoad game object.

Ok I’m only using one event system but still I can’t able to use the UI. No buttons in the UI is not working

Do you have the appropriate input module component on the same game object?

I hope so. so when I use the event system for the UI document I can see a child game object for the event system named PanelSettings with 2 scripts attached “PanelEventHandler(UI Toolkit) and Panel Raycaster(UI Toolkit)”. Is that the reason why my UI Toolkit always runs. Because these PanelSettings only create in the runtime. If i disable the PanelSettings in the runtime then UI is working and UI Toolkit not working

That’s not at all what I’m talking about. I’m referring to the component that lives alongside the event system and handles the receiving of inputs and dispatching them to UI:

https://docs.unity3d.com/Packages/com.unity.ugui@2.0/manual/script-StandaloneInputModule.html

https://docs.unity3d.com/Packages/com.unity.ugui@2.0/api/UnityEngine.EventSystems.StandaloneInputModule.html

Also worth nothing that if we’re talking about touch input, it’s quite likely that the UI toolkit interface is simply swallowing the touch input, meaning it never reaches the old UI system.

Not sure what the work around for that is.

Its a mobile game and I use buttons with UI Toolkit and UI. This the input system I’m using
Screenshot by Lightshot and Screenshot by Lightshot