Hello. I’ve encountered something that seems to be a bug. I haven’t found other topics on the subject.
Steps to reproduce:
- In a new project, create an empty GameObject.
- Add a UIDocument component to it.
- Create a UIDocument asset. Add a VisualElement and under it either a button, a checkbox or any input field as a child.
- Load UIDocument asset into the UIDocument component.
- Create a MonoBehaviour script.
- Enter PlayMode. The UI Toolkit widgets should be working.
- Modify the script, e.g. add a Debug.Log statement.
- After recompile and domain reload, try interacting with the UI. No events are being registered, no hover events or click events. I.e. the UI is completely unresponsive.
Unity version is 6000.0.27f1. This also happens in Unity 6.1 alpha. Doesn’t happen in Unity 2022.
Am I doing something wrong? Is it a bug?