# MainToolbarSlider

> Specify the content and function of a main toolbar slider.

## Definition

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

## MainToolbarSlider(MainToolbarContent, float, float, float, Action\<float>)

Specify the content and function of a main toolbar slider.

```csharp
public MainToolbarSlider(MainToolbarContent content, float value, float minValue, float maxValue, Action<float> valueChanged)
```

### Parameters

**** (\[MainToolbarContent]\(/engine/6000.7/script-reference/unityeditor/toolbars/maintoolbarcontent)): The visual content of the slider.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The default value of the slider.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The start value of the slider, it must be lower than the end value.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The end value of the slider, it must to be higher than the end value.**** (\[Action\<float>]\(https\://learn.microsoft.com/dotnet/api/system.action)): The callback that receives the new value of the slider when the user changes it.

## MainToolbarSlider(MainToolbarContent, float, float, float, Action\<float>, bool)

Specify the content and function of a main toolbar slider.

```csharp
public MainToolbarSlider(MainToolbarContent content, float value, float minValue, float maxValue, Action<float> valueChanged, bool rounded)
```

### Parameters

**** (\[MainToolbarContent]\(/engine/6000.7/script-reference/unityeditor/toolbars/maintoolbarcontent)): The visual content of the slider.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The default value of the slider.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The start value of the slider, it must be lower than the end value.**** (\[float]\(https\://learn.microsoft.com/dotnet/api/system.single)): The end value of the slider, it must to be higher than the end value.**** (\[Action\<float>]\(https\://learn.microsoft.com/dotnet/api/system.action)): The callback that receives the new value of the slider when the user changes it.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Set to true if the slider should only have values rounded to the closest int value.
