Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

How to stop UIElements event propagration.

Discussion in 'UI Toolkit' started by rkp0912, Apr 28, 2020.

  1. rkp0912

    rkp0912

    Joined:
    Feb 17, 2020
    Posts:
    4
    I have created an overlay on the scene using UI elements. When I click on the UIElements button, the event is propagating down to the game objects. Please Advise, how to stop the event propagation.

    Also, kindly let me know how to remove the attached method to the clicked event.

    Btn.clickable.clicked += () =>
    {
    GetGameObject(tuple.Item2.ToString(), Btn.tabIndex, DateTime.Now.Ticks);
    };