# AppendAction

> Appends an entry to the contextual menu.

## Definition

* **Type:** Method
* **Namespace:** [Unity.GraphToolkit.Editor](/engine/6000.7/script-reference/unity/graphtoolkit/editor.md)
* **Assembly:** UnityEditor

## AppendAction(string, Action)

Appends an entry to the contextual menu.

```csharp
public void AppendAction(string actionName, Action action)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The label of the entry. Use forward slashes to nest the entry under submenus.**** (\[Action]\(https\://learn.microsoft.com/dotnet/api/system.action)): The callback invoked when the user selects the entry.

## AppendAction(string, Action\<DropdownMenuAction>)

Appends an entry to the contextual menu.

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

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The label of the entry. Use forward slashes to nest the entry under submenus.**** (\[Action\<DropdownMenuAction>]\(https\://learn.microsoft.com/dotnet/api/system.action)): 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.

```csharp
public void AppendAction(string actionName, Action<DropdownMenuAction> action, Func<DropdownMenuAction, DropdownMenuAction.Status> actionStatusCallback, object userData = null)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The label of the entry. Use forward slashes to nest the entry under submenus.**** (\[Action\<DropdownMenuAction>]\(https\://learn.microsoft.com/dotnet/api/system.action)): The callback invoked when the user selects the entry.**** (\[Func\<DropdownMenuAction, Status>]\(https\://learn.microsoft.com/dotnet/api/system.func-1)): Callback that returns the entry's status at menu-open time.**** (\[Object]\(https\://learn.microsoft.com/dotnet/api/system.object)): Arbitrary data forwarded to `action` and `actionStatusCallback` via [\_userData](/engine/6000.7/script-reference/unityengine/uielements/dropdownmenuaction/userdata.md).
