# AddMenuItemWithContext(DropdownMenu, IEnumerable<Object>, string, string)

> Adds a MenuItem to the Scene view context menu.

## Definition

* **Type:** Method
* **Namespace:** [UnityEditor.Actions](/engine/6000.6/script-reference/unityeditor/actions.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static void AddMenuItemWithContext(DropdownMenu menu, IEnumerable<Object> context, string menuItemPath, string contextMenuPath = "")
```

### Parameters

**** (\[DropdownMenu]\(/engine/6000.6/script-reference/unityengine/uielements/dropdownmenu)): The Scene view context menu to add a [MenuItem](/engine/6000.6/script-reference/unityeditor/menuitem.md) to.**** (\[IEnumerable\<Object>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1)): Target objects for the menu item.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The menu item path that is registered with [MenuItem](/engine/6000.6/script-reference/unityeditor/menuitem.md).**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The menu item path to display in the Scene view context menu.
