# MainToolbar

> Interface for the main toolbar of the Unity Editor.

## Definition

* **Type:** Class
* **Namespace:** [UnityEditor.Toolbars](/engine/6000.7/script-reference/unityeditor/toolbars.md)
* **Assembly:** UnityEditor.CoreModule

```csharp
public static class MainToolbar
```

## Remarks

Call [MainToolbar.Refresh](/engine/6000.7/script-reference/unityeditor/toolbars/maintoolbar/refresh.md) to update a specific element in the toolbar, or [MainToolbar.OpenMainToolbarPicker](/engine/6000.7/script-reference/unityeditor/toolbars/maintoolbar/openmaintoolbarpicker.md) to open the Main Toolbar picker. To add custom elements to the toolbar, refer to [MainToolbarElementAttribute](/engine/6000.7/script-reference/unityeditor/toolbars/maintoolbarelementattribute.md) and [MainToolbarElement](/engine/6000.7/script-reference/unityeditor/toolbars/maintoolbarelement.md).

## Static Methods

| Method                                                                                                             | Description                                                                      |
| ------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------- |
| [OpenMainToolbarPicker](/engine/6000.7/script-reference/unityeditor/toolbars/maintoolbar/openmaintoolbarpicker.md) | Opens the Main Toolbar picker, pre-filtered to a search term.                    |
| [Refresh](/engine/6000.7/script-reference/unityeditor/toolbars/maintoolbar/refresh.md)                             | Notify the main toolbar to update the content or behaviour of a toolbar element. |

## Enums

| Enum                                                                                                     | Description                                           |
| -------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- |
| [MainToolbar.PickerMode](/engine/6000.7/script-reference/unityeditor/toolbars/maintoolbar/pickermode.md) | Specifies which tab the Main Toolbar picker opens to. |
