Unity - Scripting API: UIElements.DropdownMenu.AppendAction
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.
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.
Declaration
public void AppendAction(string actionName, Action<DropdownMenuAction> action, Func<DropdownMenuAction, Status> actionStatusCallback, Object userData);
Parameters
| Parameter | Description |
|---|---|
| actionName | The name of the item. This name is displayed in the dropdown menu. |
| action | The callback to execute when the user selects this item in the menu. |
| actionStatusCallback | The callback to execute to determine the status of this item. |
| userData | The object to store in the userData property of the DropdownMenuAction item. |
Description
Adds an item that executes an action in the dropdown menu.
The item is added to the end of the current item list.
Declaration
public void AppendAction(string actionName, Action<DropdownMenuAction> action, Status status);
Parameters
| Parameter | Description |
|---|---|
| actionName | The name of the item. This name is displayed in the dropdown menu. |
| action | The callback to execute when the user selects this item in the menu. |
| status | The status of the item. |
Description
Adds an item that executes an action in the dropdown menu.
The item is added to the end of the current item list.