docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class SliderFloat

    Slider UI element for floating point values.

    Inheritance
    object
    CallbackEventHandler
    Focusable
    VisualElement
    BaseVisualElement
    ExVisualElement
    BaseSlider<float, float>
    Slider<float, float, FloatField>
    SliderFloat
    ColorSlider
    Implements
    IEventHandler
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IResolvedStyle
    IContextOverrideElement
    IAdditionalDataHolder
    IInputElement<float>
    IValidatableElement<float>
    INotifyValueChanging<float>
    INotifyValueChanged<float>
    IFormattable<float>
    Inherited Members
    Slider<float, float, FloatField>.ussClassName
    Slider<float, float, FloatField>.sliderControlUssClassName
    Slider<float, float, FloatField>.trackUssClassName
    Slider<float, float, FloatField>.markContainerUssClassName
    Slider<float, float, FloatField>.progressContainerUssClassName
    Slider<float, float, FloatField>.markUssClassName
    Slider<float, float, FloatField>.markLabelUssClassName
    Slider<float, float, FloatField>.progressUssClassName
    Slider<float, float, FloatField>.thumbsContainerUssClassName
    Slider<float, float, FloatField>.thumbUssClassName
    Slider<float, float, FloatField>.inputFieldUssClassName
    Slider<float, float, FloatField>.variantUssClassName
    Slider<float, float, FloatField>.showMarksUssClassName
    Slider<float, float, FloatField>.valueDisplayVariantUssClassName
    Slider<float, float, FloatField>.trackDisplayVariantUssClassName
    Slider<float, float, FloatField>.m_SliderControl
    Slider<float, float, FloatField>.m_TrackElement
    Slider<float, float, FloatField>.m_ProgressContainer
    Slider<float, float, FloatField>.m_MarkContainer
    Slider<float, float, FloatField>.m_ThumbsContainer
    Slider<float, float, FloatField>.m_InputField
    Slider<float, float, FloatField>.showMarks
    Slider<float, float, FloatField>.showMarksLabel
    Slider<float, float, FloatField>.customMarks
    Slider<float, float, FloatField>.displayValueLabel
    Slider<float, float, FloatField>.restrictedValues
    Slider<float, float, FloatField>.scale
    Slider<float, float, FloatField>.track
    Slider<float, float, FloatField>.showInputField
    Slider<float, float, FloatField>.contentContainer
    Slider<float, float, FloatField>.KeyDecrement(float, float, KeyDownEvent)
    Slider<float, float, FloatField>.KeyIncrement(float, float, KeyDownEvent)
    Slider<float, float, FloatField>.GetTrackElement()
    Slider<float, float, FloatField>.SetOrientation(Direction)
    Slider<float, float, FloatField>.SetStep(float)
    Slider<float, float, FloatField>.OnTrackDown(Draggable)
    Slider<float, float, FloatField>.OnTrackUp(Draggable)
    Slider<float, float, FloatField>.ComputeValueFromDrag(Draggable)
    Slider<float, float, FloatField>.GetClampedValue(float)
    Slider<float, float, FloatField>.SetValueWithoutNotify(float)
    Slider<float, float, FloatField>.RefreshUI()
    Slider<float, float, FloatField>.GetOrientationClassName(Direction)
    Slider<float, float, FloatField>.GetValueDisplayModeUssClassName(ValueDisplayMode)
    Slider<float, float, FloatField>.GetTrackDisplayTypeUssClassName(TrackDisplayType)
    BaseSlider<float, float>.m_DraggerManipulator
    BaseSlider<float, float>.m_HighValue
    BaseSlider<float, float>.m_LowValue
    BaseSlider<float, float>.m_PreviousValue
    BaseSlider<float, float>.m_Value
    BaseSlider<float, float>.m_CurrentDirection
    BaseSlider<float, float>.m_ValidateValue
    BaseSlider<float, float>.m_Orientation
    BaseSlider<float, float>.m_Step
    BaseSlider<float, float>.m_ShiftStep
    BaseSlider<float, float>.m_SwapThumbs
    BaseSlider<float, float>.m_FormatString
    BaseSlider<float, float>.m_FormatFunc
    BaseSlider<float, float>.m_DraggedThumbIndex
    BaseSlider<float, float>.lowValue
    BaseSlider<float, float>.highValue
    BaseSlider<float, float>.SetValueWithoutNotify(float)
    BaseSlider<float, float>.value
    BaseSlider<float, float>.formatString
    BaseSlider<float, float>.formatFunction
    BaseSlider<float, float>.invalid
    BaseSlider<float, float>.validateValue
    BaseSlider<float, float>.orientation
    BaseSlider<float, float>.step
    BaseSlider<float, float>.shiftStep
    BaseSlider<float, float>.swapThumbs
    BaseSlider<float, float>.comparer
    BaseSlider<float, float>.thumbComparer
    BaseSlider<float, float>.OnSliderRangeChanged()
    BaseSlider<float, float>.SetOrientation(Direction)
    BaseSlider<float, float>.SetStep(float)
    BaseSlider<float, float>.SetShiftStep(float)
    BaseSlider<float, float>.SetSwapThumbs(bool)
    BaseSlider<float, float>.InvokeValueChangedCallbacks()
    BaseSlider<float, float>.OnGeometryChanged(GeometryChangedEvent)
    BaseSlider<float, float>.OnStyleResolved(CustomStyleResolvedEvent)
    BaseSlider<float, float>.OnDirectionChanged(ContextChangedEvent<DirContext>)
    BaseSlider<float, float>.OnTrackUp(Draggable)
    BaseSlider<float, float>.OnTrackDown(Draggable)
    BaseSlider<float, float>.OnTrackDragged(Draggable)
    BaseSlider<float, float>.GetTrackElement()
    BaseSlider<float, float>.ComputeValueFromDrag(Draggable)
    BaseSlider<float, float>.GetNormalizedValueFromDrag(Draggable)
    BaseSlider<float, float>.FindClosestThumbValue(Draggable, ReadOnlySpan<float>, out int)
    BaseSlider<float, float>.FindClosestThumbValue(float, ReadOnlySpan<float>, out int)
    BaseSlider<float, float>.FindClosestThumbValue(float, int, Func<int, float>, out int)
    BaseSlider<float, float>.OnKeyDown(KeyDownEvent)
    BaseSlider<float, float>.OnTrackClicked()
    BaseSlider<float, float>.GetClampedValue(float)
    BaseSlider<float, float>.KeyDecrement(float, float, KeyDownEvent)
    BaseSlider<float, float>.KeyIncrement(float, float, KeyDownEvent)
    BaseSlider<float, float>.Clamp(float, float, float)
    BaseSlider<float, float>.thumbCount
    BaseSlider<float, float>.GetValueFromScalarValues(Span<float>)
    BaseSlider<float, float>.GetScalarValuesFromValue(float, Span<float>)
    BaseSlider<float, float>.ClampThumb(float, float, float)
    BaseSlider<float, float>.ParseValueToString(float)
    BaseSlider<float, float>.ParseRawValueToString(float)
    BaseSlider<float, float>.ParseSubValueToString(float)
    BaseSlider<float, float>.ParseStringToValue(string, out float)
    BaseSlider<float, float>.SliderLerpUnclamped(float, float, float)
    BaseSlider<float, float>.SliderNormalizeValue(float, float, float)
    BaseSlider<float, float>.Mad(int, float, float)
    BaseSlider<float, float>.GetStepCount(float)
    ExVisualElement.contentContainer
    ExVisualElement.outlineColor
    ExVisualElement.backgroundColor
    ExVisualElement.passMask
    BaseVisualElement.contextPrefix
    BaseVisualElement.scaleOverride
    BaseVisualElement.themeOverride
    BaseVisualElement.langOverride
    BaseVisualElement.layoutDirectionOverride
    BaseVisualElement.preferredTooltipPlacementOverride
    BaseVisualElement.tooltipDelayMsOverride
    BaseVisualElement.GetLayoutDirectionUssClassName(Dir)
    VisualElement.disabledUssClassName
    VisualElement.ExecuteDefaultAction(EventBase)
    VisualElement.Focus()
    VisualElement.SendEvent(EventBase)
    VisualElement.SetEnabledFromHierarchy(bool)
    VisualElement.SetEnabled(bool)
    VisualElement.MarkDirtyRepaint()
    VisualElement.ContainsPoint(Vector2)
    VisualElement.Overlaps(Rect)
    VisualElement.DoMeasure(float, VisualElement.MeasureMode, float, VisualElement.MeasureMode)
    VisualElement.ToString()
    VisualElement.GetClasses()
    VisualElement.ClearClassList()
    VisualElement.AddToClassList(string)
    VisualElement.RemoveFromClassList(string)
    VisualElement.ToggleInClassList(string)
    VisualElement.EnableInClassList(string, bool)
    VisualElement.ClassListContains(string)
    VisualElement.FindAncestorUserData()
    VisualElement.Add(VisualElement)
    VisualElement.Insert(int, VisualElement)
    VisualElement.Remove(VisualElement)
    VisualElement.RemoveAt(int)
    VisualElement.Clear()
    VisualElement.ElementAt(int)
    VisualElement.IndexOf(VisualElement)
    VisualElement.Children()
    VisualElement.Sort(Comparison<VisualElement>)
    VisualElement.BringToFront()
    VisualElement.SendToBack()
    VisualElement.PlaceBehind(VisualElement)
    VisualElement.PlaceInFront(VisualElement)
    VisualElement.RemoveFromHierarchy()
    VisualElement.GetFirstOfType<T>()
    VisualElement.GetFirstAncestorOfType<T>()
    VisualElement.Contains(VisualElement)
    VisualElement.FindCommonAncestor(VisualElement)
    VisualElement.viewDataKey
    VisualElement.userData
    VisualElement.canGrabFocus
    VisualElement.focusController
    VisualElement.usageHints
    VisualElement.transform
    VisualElement.layout
    VisualElement.contentRect
    VisualElement.paddingRect
    VisualElement.worldBound
    VisualElement.localBound
    VisualElement.worldTransform
    VisualElement.pickingMode
    VisualElement.name
    VisualElement.enabledInHierarchy
    VisualElement.enabledSelf
    VisualElement.visible
    VisualElement.generateVisualContent
    VisualElement.experimental
    VisualElement.hierarchy
    VisualElement.cacheAsBitmap
    VisualElement.parent
    VisualElement.panel
    VisualElement.visualTreeAssetSource
    VisualElement.this[int]
    VisualElement.childCount
    VisualElement.schedule
    VisualElement.style
    VisualElement.customStyle
    VisualElement.styleSheets
    VisualElement.tooltip
    VisualElement.resolvedStyle
    Focusable.Blur()
    Focusable.focusable
    Focusable.tabIndex
    Focusable.delegatesFocus
    CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
    CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
    CallbackEventHandler.HandleEvent(EventBase)
    CallbackEventHandler.HasTrickleDownHandlers()
    CallbackEventHandler.HasBubbleUpHandlers()
    CallbackEventHandler.ExecuteDefaultActionAtTarget(EventBase)
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    Namespace: Unity.AppUI.UI
    Assembly: Unity.AppUI.dll
    Syntax
    public class SliderFloat : Slider<float, float, FloatField>, IEventHandler, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IResolvedStyle, IContextOverrideElement, IAdditionalDataHolder, IInputElement<float>, IValidatableElement<float>, INotifyValueChanging<float>, INotifyValueChanged<float>, IFormattable<float>

    Constructors

    SliderFloat()

    Default constructor.

    Declaration
    public SliderFloat()

    Properties

    thumbCount

    Get the number of thumbs for this slider.

    Declaration
    protected override int thumbCount { get; }
    Property Value
    Type Description
    int
    Overrides
    BaseSlider<float, float>.thumbCount

    Methods

    ClampThumb(float, float, float)

    Clamp the thumb value.

    Declaration
    protected override float ClampThumb(float x, float min, float max)
    Parameters
    Type Name Description
    float x

    The value to clamp.

    float min

    The minimum value.

    float max

    The maximum value.

    Returns
    Type Description
    float

    The clamped values.

    Overrides
    BaseSlider<float, float>.ClampThumb(float, float, float)

    GetScalarValuesFromValue(float, Span<float>)

    Get the list of thumb values from the TValue value. This must be sorted.

    Declaration
    protected override void GetScalarValuesFromValue(float v, Span<float> values)
    Parameters
    Type Name Description
    float v
    Span<float> values

    The list of thumb values.

    Overrides
    BaseSlider<float, float>.GetScalarValuesFromValue(float, Span<float>)

    GetStepCount(float)

    Get the number of possible steps between the lowValue and highValue.

    Declaration
    protected override int GetStepCount(float stepValue)
    Parameters
    Type Name Description
    float stepValue

    The step value.

    Returns
    Type Description
    int

    The number of possible steps.

    Overrides
    BaseSlider<float, float>.GetStepCount(float)

    GetValueFromScalarValues(Span<float>)

    Get the TValue value from the list of thumb values.

    Declaration
    protected override float GetValueFromScalarValues(Span<float> values)
    Parameters
    Type Name Description
    Span<float> values

    The list of thumb values.

    Returns
    Type Description
    float

    The TValue value.

    Overrides
    BaseSlider<float, float>.GetValueFromScalarValues(Span<float>)

    Mad(int, float, float)

    Performs an arithmetic multiply/add operation.

    Declaration
    protected override float Mad(int m, float a, float b)
    Parameters
    Type Name Description
    int m

    The number of times to multiply the a value.

    float a

    The value that will be multiplied N times and then added to the base value.

    float b

    The addition value.

    Returns
    Type Description
    float

    The incremented value.

    Overrides
    BaseSlider<float, float>.Mad(int, float, float)

    ParseStringToValue(string, out float)

    Method to implement to resolve a string value into a float value.

    You can use TryParse(string, out float) for floating point value types for example.

    Declaration
    protected override bool ParseStringToValue(string strValue, out float v)
    Parameters
    Type Name Description
    string strValue

    The string value to convert.

    float v
    Returns
    Type Description
    bool

    True if can be parsed, False otherwise.

    Overrides
    BaseSlider<float, float>.ParseStringToValue(string, out float)

    ParseSubValueToString(float)

    Method to implement to resolve a float value into a string value.

    You can use ToString() for floating point value types for example.

    You can also round the value if you want a specific number of decimals.

    Declaration
    protected override string ParseSubValueToString(float val)
    Parameters
    Type Name Description
    float val

    The float value to convert.

    Returns
    Type Description
    string

    The converted value.

    Overrides
    BaseSlider<float, float>.ParseSubValueToString(float)

    ParseValueToString(float)

    Method to implement to resolve a float value into a string value.

    You can use ToString() for floating point value types for example.

    You can also round the value if you want a specific number of decimals.

    Declaration
    protected override string ParseValueToString(float val)
    Parameters
    Type Name Description
    float val

    The float value to convert.

    Returns
    Type Description
    string

    The converted value.

    Overrides
    BaseSlider<float, float>.ParseValueToString(float)

    SliderLerpUnclamped(float, float, float)

    Method to implement which returns a value based on the linear interpolation of a given interpolant between a specific range.

    Usually, you can use directly LerpUnclamped(float, float, float) for floating point value types.

    Declaration
    protected override float SliderLerpUnclamped(float a, float b, float interpolant)
    Parameters
    Type Name Description
    float a

    The lowest value in the range.

    float b

    The highest value in the range.

    float interpolant

    The normalized value to process.

    Returns
    Type Description
    float

    The interpolated value.

    Overrides
    BaseSlider<float, float>.SliderLerpUnclamped(float, float, float)

    SliderNormalizeValue(float, float, float)

    Method to implement which returns the normalized value of a given value in a specific range.

    Usually, you can use directly an InverseLerp(float, float, float) for floating point value types.

    Declaration
    protected override float SliderNormalizeValue(float currentValue, float lowerValue, float higherValue)
    Parameters
    Type Name Description
    float currentValue

    The value to normalize.

    float lowerValue

    The lowest value in the range.

    float higherValue

    The highest value in the range.

    Returns
    Type Description
    float

    The normalized value.

    Overrides
    BaseSlider<float, float>.SliderNormalizeValue(float, float, float)

    Implements

    IEventHandler
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IResolvedStyle
    IContextOverrideElement
    IAdditionalDataHolder
    IInputElement<TValue>
    IValidatableElement<TValue>
    INotifyValueChanging<TValue>
    INotifyValueChanged<T>
    IFormattable<TValue>

    Extension Methods

    NotifyValueChangingExtensions.RegisterValueChangingCallback<TValue>(INotifyValueChanging<TValue>, EventCallback<ChangingEvent<TValue>>)
    NotifyValueChangingExtensions.UnregisterValueChangingCallback<TValue>(INotifyValueChanging<TValue>, EventCallback<ChangingEvent<TValue>>)
    VisualElementExtensions.FindNavController(VisualElement)
    RegisterUpdateCallbackExtensions.RegisterUpdateCallback(VisualElement, EventCallback<UpdateEvent>)
    RegisterUpdateCallbackExtensions.UnregisterUpdateCallback(VisualElement, EventCallback<UpdateEvent>)
    VisualElementExtensions.EnableDynamicTransform(VisualElement, bool)
    VisualElementExtensions.EnablePicking(VisualElement, bool)
    VisualElementExtensions.GetChildren<T>(VisualElement, bool)
    VisualElementExtensions.GetContextProvider<T>(VisualElement)
    VisualElementExtensions.GetContextProvider<T>(VisualElement, string)
    VisualElementExtensions.GetContext<T>(VisualElement)
    VisualElementExtensions.GetContext<T>(VisualElement, string)
    VisualElementExtensions.GetExclusiveRootElement(VisualElement)
    VisualElementExtensions.GetLastAncestorOfType<T>(VisualElement)
    VisualElementExtensions.GetPreferredTooltipPlacement(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement)
    VisualElementExtensions.GetSelfContext<T>(VisualElement, string)
    VisualElementExtensions.GetTooltipContent(VisualElement)
    VisualElementExtensions.GetTooltipTemplate(VisualElement)
    VisualElementExtensions.HasAncestorsOfType<T>(VisualElement)
    VisualElementExtensions.IsContextProvider<T>(VisualElement)
    VisualElementExtensions.IsContextProvider<T>(VisualElement, string)
    VisualElementExtensions.IsInvisible(VisualElement)
    VisualElementExtensions.IsOnScreen(VisualElement)
    VisualElementExtensions.ProvideContext<T>(VisualElement, string, T)
    VisualElementExtensions.ProvideContext<T>(VisualElement, T)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, string, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.RegisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.SetPreferredTooltipPlacement(VisualElement, OptionalEnum<PopoverPlacement>)
    VisualElementExtensions.SetTooltipContent(VisualElement, VisualElementExtensions.TooltipContentCallback)
    VisualElementExtensions.SetTooltipTemplate(VisualElement, VisualElement)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, string, EventCallback<ContextChangedEvent<T>>)
    VisualElementExtensions.UnregisterContextChangedCallback<T>(VisualElement, EventCallback<ContextChangedEvent<T>>)
    In This Article
    Back to top
    Copyright © 2025 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)