Search Unity

[UIElements] Detect callbacks

Discussion in 'UI Toolkit' started by Devi-User, Oct 14, 2018.

  1. Devi-User

    Devi-User

    Joined:
    Apr 30, 2016
    Posts:
    61
    I tried to solve the problem I described here and faced the following question:
    Is it possible in any way to see which particular callbacks / manipulators have worked / can work when elements are exposed to them?
    That is, I have a number of callbacks that are embedded inside GraphView, and I want to know what exactly worked when I gave MouseDown there.
    I would be grateful for any help, including information about the fields and teams that can help
    find out (but not a profiler, this is a very bad decision in this situation)
     
  2. Devi-User

    Devi-User

    Joined:
    Apr 30, 2016
    Posts:
    61
    I learned that I can override HandleEvent and this allows me to track events from elements created by me. However, this does not solve the problem with native classes.
     
  3. uDamian

    uDamian

    Unity Technologies

    Joined:
    Dec 11, 2017
    Posts:
    1,231
    We have an Events debugger in the works but no ETA on when that will be available. In the mean time, your best bet is to add additional CallbackRegistrations on the elements you're interested in and for the Event types you want to track.
     
  4. benoitd_unity

    benoitd_unity

    Unity Technologies

    Joined:
    Jan 2, 2018
    Posts:
    331
    FYI, we now have a dedicated sub-forums where you can use for all your questions and feedback related to UI Systems Previews.

    Cheers,