Version: 2023.2
LanguageEnglish
  • C#

DropdownMenu

class in UnityEngine.UIElements

/

Implemented in:UnityEngine.UIElementsModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Represents a dropdown menu.

Public Methods

AppendAction Adds an item that executes an action in the dropdown menu.
AppendHeaderAction Adds a header item to the dropdown menu.
AppendSeparator Adds a separator line in the menu.
ClearHeaderItems Clears all header items from the menu.
ClearItems Clears all items from the menu.
InsertAction Adds an item that executes an action in the dropdown menu.
InsertHeaderAction Adds a header item to the dropdown menu.
InsertSeparator Adds a separator line in the menu.
MenuItems Gets the list of menu items.
PrepareForDisplay Gets the status of all items by calling their status callback and removes the excess separators.
RemoveHeaderItemAt Removes the menu header item at index.
RemoveItemAt Removes the menu item at index.