# MenuCommand

> Creates a new MenuCommand object.

## Definition

* **Type:** Constructor
* **Namespace:** [UnityEditor](/engine/6000.0/script-reference/unityeditor.md)
* **Assembly:** UnityEditor

## MenuCommand(Object, int)

Creates a new MenuCommand object.

```csharp
public MenuCommand(Object inContext, int inUserData)
```

### Parameters

**** (\[Object]\(/engine/6000.0/script-reference/unityengine/object)): **** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)):&#x20;

### Remarks

Context and userData will be initialized to inContext and inUserdata respectively.

## MenuCommand(Object)

Creates a new MenuCommand object.

```csharp
public MenuCommand(Object inContext)
```

### Parameters

**** (\[Object]\(/engine/6000.0/script-reference/unityengine/object)):&#x20;

### Remarks

Context will be initialized to inContext and userdata will be set to 0.
