Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Slider

A slider containing floating point values.
Read time 11 minutesLast updated 3 hours ago

Definition

[Icon("UIToolkit/Icons/Slider.png")][UxmlElement(libraryPath = "Controls")]public class Slider : BaseSlider<float>, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, ICustomStyle, IBindable, IMixedValueSupport, INotifyValueChanged<float>, IValueField<float>

Remarks

The Slider control is a horizontal or vertical bar with a handle that can be moved to select a value from a range. The range is defined by the
lowValue
and
highValue
properties.
The slider manages navigation events in a customized manner. When it detects NavigationMoveEvent. that align with the slider's direction, it adjusts the slider's value. If it detects a NavigationSubmitEvent, it removes the BaseSlider<TValueType>.movableUssClassName class from the dragger, causing all Navigation events to revert to their default behavior. A second navigation submit event re-enables the movableUssClassName class on the dragger and restores the previous customized behavior.
For more information and code examples, refer to the UXML element Slider manual page.
Additional Resources: MinMaxSlider

Static Fields

Value

Description

inputUssClassNameUSS class name of input elements in elements of this type.
labelUssClassNameUSS class name of labels in elements of this type.
ussClassNameUSS class name of elements of this type.

Constructors

Inheritance

Inherited Members