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

Bug GenericDropdownMenu bug

Discussion in 'UI Toolkit' started by Robin_Moss, Nov 9, 2022.

  1. Robin_Moss

    Robin_Moss

    Joined:
    Jun 9, 2021
    Posts:
    4
    Trying to use the GenericDropdownMenu, we found a bug which leads to the callbacks not being registered.

    When the `OnDetachFromPanel` is called, it unregisters the callbacks for `AttachToPanelEvent` and `DetachFromPanelEvent`, which means that when the menu is opened after the first time the `OnAttachToPanel` is never called again meaning none of the callbacks for events are registered again

    The problematic code is here: https://github.com/Unity-Technologi....ui/Core/Controls/GenericDropdownMenu.cs#L132
     
  2. vikas-shah

    vikas-shah

    Joined:
    Jun 10, 2021
    Posts:
    1