Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


MinMaxSlider

A min/max slider containing a representation of a range. For more information, refer to UXML element MinMaxSlider.
Read time 10 minutesLast updated 8 days ago

Definition

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

Remarks

The MinMaxSlider manages navigation events in a customized manner. The MinMaxSlider has four navigation states:
  • Min thumb: adjusts the slider's minimum value if the NavigationMoveEvent aligns with the slider's direction.
  • Max thumb: adjusts the slider's maximum value if the NavigationMoveEvent aligns with the slider's direction.
  • Middle thumb: adjusts the slider's minimum and maximum values if the NavigationMoveEvent aligns with the slider's direction.
  • Default navigation: NavigationMoveEvent are ignored and handled by the default systems.
The MinMaxSlider cycles through the navigation states when a NavigationSubmitEvent is received.
Additional Resources: Slider

Static Fields

Value

Description

draggerUssClassNameUSS class name of dragger elements in elements of this type.
inputUssClassNameUSS class name of input elements in elements of this type.
labelUssClassNameUSS class name of labels in elements of this type.
maxThumbUssClassNameUSS class name of the maximum thumb elements in elements of this type.
minThumbUssClassNameUSS class name of the minimum thumb elements in elements of this type.
movableUssClassNameUSS class name of the element that is currently controlled by NavigationMoveEvent. When a NavigationSubmitEvent is received the slider cycles through the elements in the following order:
trackerUssClassNameUSS class name of tracker elements in elements of this type.
ussClassNameUSS class name of elements of this type.

Constructors

Properties

Property

Description

highLimitThis is the high limit of the slider.
lowLimitThis is the low limit of the slider.
maxValueThis is the high value of the range represented on the slider.
minValueThis is the low value of the range represented on the slider.
rangeReturns the range of the low/high limits of the slider.
valueThis is the value of the slider. This is a Vector2 where the x is the lower bound and the y is the higher bound.

Inheritance

Inherited Members