Version: Unity 6.7 Alpha (6000.7)
LanguageEnglish
  • C#

GraphMenuContext.AppendAction

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

Declaration

public void AppendAction(string actionName, Action action);

Parameters

Parameter Description
actionName The label of the entry. Use forward slashes to nest the entry under submenus.
action The callback invoked when the user selects the entry.

Description

Appends an entry to the contextual menu.


Declaration

public void AppendAction(string actionName, Action<DropdownMenuAction> action);

Parameters

Parameter Description
actionName The label of the entry. Use forward slashes to nest the entry under submenus.
action The callback invoked when the user selects the entry. The argument gives access to the user data set on the entry.

Description

Appends an entry to the contextual menu.


Declaration

public void AppendAction(string actionName, Action<DropdownMenuAction> action, Func<DropdownMenuAction, Status> actionStatusCallback, Object userData);

Parameters

Parameter Description
actionName The label of the entry. Use forward slashes to nest the entry under submenus.
action The callback invoked when the user selects the entry.
actionStatusCallback Callback that returns the entry's status at menu-open time.
userData Arbitrary data forwarded to action and actionStatusCallback via DropdownMenuAction.userData.

Description

Appends an entry to the contextual menu, with a status callback that decides whether the entry is enabled, disabled, or checked when the menu opens.