# EditorToolbarButton

> Constructor.

## Definition

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

## EditorToolbarButton()

Constructor.

```csharp
public EditorToolbarButton()
```

## EditorToolbarButton(Action)

Constructor.

```csharp
public EditorToolbarButton(Action clickEvent)
```

### Parameters

**** (\[Action]\(https\://learn.microsoft.com/dotnet/api/system.action)): Action triggered when the button is clicked.

## EditorToolbarButton(string, Action)

Constructor.

```csharp
public EditorToolbarButton(string text, Action clickEvent)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The text associated with the element.**** (\[Action]\(https\://learn.microsoft.com/dotnet/api/system.action)): Action triggered when the button is clicked.

## EditorToolbarButton(Texture2D, Action)

Constructor.

```csharp
public EditorToolbarButton(Texture2D icon, Action clickEvent)
```

### Parameters

**** (\[Texture2D]\(/engine/6000.7/script-reference/unityengine/texture2d)): The icon associated with the element.**** (\[Action]\(https\://learn.microsoft.com/dotnet/api/system.action)): Action triggered when the button is clicked.

## EditorToolbarButton(string, Texture2D, Action)

Constructor.

```csharp
public EditorToolbarButton(string text, Texture2D icon, Action clickEvent)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The text associated with the element.**** (\[Texture2D]\(/engine/6000.7/script-reference/unityengine/texture2d)): The icon associated with the element.**** (\[Action]\(https\://learn.microsoft.com/dotnet/api/system.action)): Action triggered when the button is clicked.
