Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


MainToolbarSlider

Specify the content and function of a main toolbar slider.
Read time 1 minuteLast updated 12 days ago

Definition

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

Specify the content and function of a main toolbar slider.
public MainToolbarSlider(MainToolbarContent content, float value, float minValue, float maxValue, Action<float> valueChanged)

Parameters

The visual content of the slider.

value

The default value of the slider.

minValue

The start value of the slider, it must be lower than the end value.

maxValue

The end value of the slider, it must to be higher than the end value.

valueChanged

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.
public MainToolbarSlider(MainToolbarContent content, float value, float minValue, float maxValue, Action<float> valueChanged, bool rounded)

Parameters

The visual content of the slider.

value

The default value of the slider.

minValue

The start value of the slider, it must be lower than the end value.

maxValue

The end value of the slider, it must to be higher than the end value.

valueChanged

The callback that receives the new value of the slider when the user changes it.

rounded

Set to true if the slider should only have values rounded to the closest int value.