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

UI Dropdown menu

Discussion in 'UI Toolkit' started by tiggaxxx, Sep 15, 2021.

  1. tiggaxxx

    tiggaxxx

    Joined:
    Jan 13, 2020
    Posts:
    30
    Hi guys,

    Does anyone know how to keep the dropdown menu open after selecting an item?

    I tried using the Show method, but didn't work.
     
  2. uBenoitA

    uBenoitA

    Unity Technologies

    Joined:
    Apr 15, 2020
    Posts:
    214
    The Dropdown menu in Unity is currently the menu that comes from the operating system, so we don't have much control over it unfortunately. You would probably have to create a UI Toolkit-based menu from scratch and make it do what you need, or to start from the GenericDropdownMenu and work your way from there, but there's no easy solution for you at the moment apart from doing most of the work manually.
     
  3. tiggaxxx

    tiggaxxx

    Joined:
    Jan 13, 2020
    Posts:
    30
    I copied the Dropdown menu code from the UI toolkit and modified it to my needs.