Experimental: this API is experimental and might be changed or removed in the future.

DropdownMenu

class in UnityEngine.Experimental.UIElements

切换到手册

描述

A drop-down menu.

构造函数

DropdownMenu构造函数。

公共函数

AppendActionAdd an item that will execute an action in the drop-down menu. The item is added at the end of the current item list.
AppendSeparator在菜单中添加一条分隔线。分隔线添加在当前项目列表末尾。
InsertActionAdd an item that will execute an action in the drop-down menu. The item is added at the end of the specified index in the list.
InsertSeparator在菜单中添加一条分隔线。分隔线添加在列表中指定索引末尾。
MenuItems获取菜单项列表。
PrepareForDisplay通过调用项目的状态回调更新所有项目状态并删除多余分隔线。这是在显示菜单之前调用的。
RemoveItemAtRemove the menu item at index.