Search Unity

Bug Trickedown Doesn't Work With IPointerHandler

Discussion in 'UI Toolkit' started by MousePods, Sep 28, 2021.

  1. MousePods

    MousePods

    Joined:
    Jul 19, 2012
    Posts:
    468
    Hi,

    Is this a bug?

    1. I have a Visual Element that takes up the entire screen.
    2. I registered this callback on it and TrickleDown set to true.
    3. Code (CSharp):
      1. collectableMenu.Q("stop-camera").RegisterCallback<PointerDownEvent>(collectableMenuInteraction.InteractedWithScreen, TrickleDown.TrickleDown);
    4. I am using a physics2D raycaster on my camera.
    5. I also have IPointerClickHandler in my script along with the corresponding method.
    However, when I click on the boxcollider2D, it doesn't call the method. If I turn off the visual element, it works.

    Why doesn't trickledown allow the event to go to the script?

    Thanks!
     
    Last edited: Sep 28, 2021
unityunity