# EditorToolContextAttribute(string, Type)

> Registers an EditorToolContext as either a global tool context or a Component tool context.

## Definition

* **Type:** Constructor
* **Namespace:** [UnityEditor.EditorTools](/engine/6000.7/script-reference/unityeditor/editortools.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public EditorToolContextAttribute(string displayName = "", Type targetType = null)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The name to display in menus.**** (\[Type]\(https\://learn.microsoft.com/dotnet/api/system.type)): Set to the type that this tool can edit. Set to null if the tool is not a [Component](/engine/6000.7/script-reference/unityengine/component.md) tool.
