# EditorToolbarToggle

> Constructor.

## Definition

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

## EditorToolbarToggle()

Constructor.

```csharp
public EditorToolbarToggle()
```

## EditorToolbarToggle(string)

Constructor.

```csharp
public EditorToolbarToggle(string text)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The text associated with the toggle.

## EditorToolbarToggle(Texture2D)

Constructor.

```csharp
public EditorToolbarToggle(Texture2D icon)
```

### Parameters

**** (\[Texture2D]\(/engine/6000.7/script-reference/unityengine/texture2d)): The icon associated with the toggle.

## EditorToolbarToggle(Texture2D, Texture2D)

Constructor.

```csharp
public EditorToolbarToggle(Texture2D onIcon, Texture2D offIcon)
```

### Parameters

**** (\[Texture2D]\(/engine/6000.7/script-reference/unityengine/texture2d)): The icon associated with the toggle when the value is true.**** (\[Texture2D]\(/engine/6000.7/script-reference/unityengine/texture2d)): The icon associated with the toggle when the value is false.

## EditorToolbarToggle(string, string)

Constructor.

```csharp
public EditorToolbarToggle(string textIcon, string label)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): **** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)):&#x20;

## EditorToolbarToggle(string, Texture2D, Texture2D)

Constructor.

```csharp
public EditorToolbarToggle(string text, Texture2D onIcon, Texture2D offIcon)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): The text associated with the toggle.**** (\[Texture2D]\(/engine/6000.7/script-reference/unityengine/texture2d)): The icon associated with the toggle when the value is true.**** (\[Texture2D]\(/engine/6000.7/script-reference/unityengine/texture2d)): The icon associated with the toggle when the value is false.
