Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

Question Inconsistent behaviour with callbacks and finind root elements

Discussion in 'UI Toolkit' started by Slashscreen, Jan 25, 2023.

  1. Slashscreen

    Slashscreen

    Joined:
    Jul 2, 2015
    Posts:
    13
    For about a week now I have been trying to debug an issue. for a while, my UI Documents have been inconsistent with whether they receive input events, like MouseDown and such, requiring me to restart unity to fix it. Then, for a while, it stopped receiving events altogether. But just yesterday, it goes between receiving inputs, but some/all of my scripts believing that the UI Document's rootVisualAsset is null, to most of them working properly, but no events processed. The behavior changes when I restart unity.

    What on earth could be causing this? How do I troubleshoot it? I've been banging my head into a wall for a week on this, going up many dead-end paths, and it is frankly driving me mad and has ground most forward progress to a halt. UI Toolkit has been treating me nice so far. I didn't touch anything to cause this to happen. Could it be the domain reloading? I have no earthly idea. Does anyone else have a clue?

    Using the new input system on 2022.2.0b16.112.5806, Windows 10.
     
  2. pierre_10

    pierre_10

    Unity Technologies

    Joined:
    Apr 1, 2016
    Posts:
    33