AppendAction
Appends an entry to the contextual menu.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Method
- Namespace: Unity.GraphToolkit.Editor
- Assembly: UnityEditor
AppendAction(string, Action)
Appends an entry to the contextual menu.
public void AppendAction(string actionName, Action action)
Parameters
AppendAction(string, Action<DropdownMenuAction>)
Appends an entry to the contextual menu.
public void AppendAction(string actionName, Action<DropdownMenuAction> action)
Parameters
The label of the entry. Use forward slashes to nest the entry under submenus.
The callback invoked when the user selects the entry. The argument gives access to the user data set on the entry.
AppendAction(string, Action<DropdownMenuAction>, Func<DropdownMenuAction, Status>, Object)
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.
public void AppendAction(string actionName, Action<DropdownMenuAction> action, Func<DropdownMenuAction, DropdownMenuAction.Status> actionStatusCallback, object userData = null)
Parameters
The label of the entry. Use forward slashes to nest the entry under submenus.
The callback invoked when the user selects the entry.
Callback that returns the entry's status at menu-open time.