docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class NumericProperty<TValue, TField>

    A labelled numeric property row: a scrubbable label paired with a numeric field, both driven by a single value.

    Inheritance
    object
    CallbackEventHandler
    Focusable
    VisualElement
    BaseVisualElement
    InputLabel
    NumericProperty<TValue, TField>
    NumericPropertyFloat
    NumericPropertyInt
    Implements
    IEventHandler
    IResolvedStyle
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IContextOverrideElement
    IAdditionalDataHolder
    IInputElement<TValue>
    IValidatableElement<TValue>
    INotifyValueChanged<TValue>
    ISizeableElement
    Inherited Members
    InputLabel.orientationUssClassName
    InputLabel.inputContainerUssClassName
    InputLabel.containerUssClassName
    InputLabel.labelContainerUssClassName
    InputLabel.fieldLabelUssClassName
    InputLabel.iconUssClassName
    InputLabel.withIconUssClassName
    InputLabel.capValueUssClassName
    InputLabel.helpTextUssClassName
    InputLabel.inputAlignmentUssClassName
    InputLabel.withHelpTextUssClassName
    InputLabel.draggingUssClassName
    InputLabel.rowLayoutUssClassName
    InputLabel.columnsUssClassName
    InputLabel.columnsModeUssClassName
    InputLabel.columnUssClassName
    InputLabel.pairLoneUssClassName
    InputLabel.tallUssClassName
    InputLabel.contentContainer
    InputLabel.label
    InputLabel.direction
    InputLabel.labelOverflow
    InputLabel.inputAlignment
    InputLabel.required
    InputLabel.indicatorType
    InputLabel.requiredText
    InputLabel.helpMessage
    InputLabel.helpVariant
    InputLabel.icon
    InputLabel.capValue
    InputLabel.draggable
    InputLabel.inputContainer
    InputLabel.rowLayout
    InputLabel.columns
    InputLabel.tall
    InputLabel.labelFor
    InputLabel.RefreshColumnMarkers()
    InputLabel.GetInputAlignmentUssClassName(Align)
    InputLabel.GetOrientationUssClassName(Direction)
    InputLabel.GetRowLayoutUssClassName(InputLabelRowLayout)
    InputLabel.GetColumnsUssClassName(InputLabelColumns)
    BaseVisualElement.contextPrefix
    BaseVisualElement.densityOverride
    BaseVisualElement.themeOverride
    BaseVisualElement.langOverride
    BaseVisualElement.layoutDirectionOverride
    BaseVisualElement.preferredTooltipPlacementOverride
    BaseVisualElement.tooltipDelayMsOverride
    BaseVisualElement.GetLayoutDirectionUssClassName(Dir)
    VisualElement.disabledUssClassName
    VisualElement.SetActivePseudoState(bool)
    VisualElement.SetCheckedPseudoState(bool)
    VisualElement.Focus()
    VisualElement.SendEvent(EventBase)
    VisualElement.SetEnabledFromHierarchy(bool)
    VisualElement.SetEnabled(bool)
    VisualElement.MarkDirtyRepaint()
    VisualElement.IsMarkedForRepaint()
    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.SetBinding(BindingId, Binding)
    VisualElement.GetBinding(BindingId)
    VisualElement.TryGetBinding(BindingId, out Binding)
    VisualElement.GetBindingInfos()
    VisualElement.GetBindingInfos(List<BindingInfo>)
    VisualElement.HasBinding(BindingId)
    VisualElement.ClearBinding(BindingId)
    VisualElement.ClearBindings()
    VisualElement.GetHierarchicalDataSourceContext()
    VisualElement.GetDataSourceContext(BindingId)
    VisualElement.TryGetDataSourceContext(BindingId, out DataSourceContext)
    VisualElement.TryGetLastBindingToUIResult(in BindingId, out BindingResult)
    VisualElement.TryGetLastBindingToSourceResult(in BindingId, out BindingResult)
    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.disablePlayModeTint
    VisualElement.usageHints
    VisualElement.transform
    VisualElement.scaledPixelsPerPoint
    VisualElement.layout
    VisualElement.contentRect
    VisualElement.paddingRect
    VisualElement.worldBound
    VisualElement.localBound
    VisualElement.worldTransform
    VisualElement.hasActivePseudoState
    VisualElement.hasInactivePseudoState
    VisualElement.hasHoverPseudoState
    VisualElement.hasCheckedPseudoState
    VisualElement.hasEnabledPseudoState
    VisualElement.hasDisabledPseudoState
    VisualElement.hasFocusPseudoState
    VisualElement.hasRootPseudoState
    VisualElement.pickingMode
    VisualElement.name
    VisualElement.enabledInHierarchy
    VisualElement.enabledSelf
    VisualElement.languageDirection
    VisualElement.visible
    VisualElement.generateVisualContent
    VisualElement.dataSource
    VisualElement.dataSourcePath
    VisualElement.dataSourceType
    VisualElement.experimental
    VisualElement.hierarchy
    VisualElement.cacheAsBitmap
    VisualElement.parent
    VisualElement.panel
    VisualElement.visualTreeAssetSource
    VisualElement.this[int]
    VisualElement.childCount
    VisualElement.schedule
    VisualElement.style
    VisualElement.resolvedStyle
    VisualElement.customStyle
    VisualElement.styleSheets
    VisualElement.tooltip
    Focusable.Blur()
    Focusable.focusable
    Focusable.tabIndex
    Focusable.delegatesFocus
    CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.RegisterCallbackOnce<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
    CallbackEventHandler.RegisterCallbackOnce<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, TrickleDown)
    CallbackEventHandler.RegisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
    CallbackEventHandler.RegisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TUserArgsType, CallbackOptions)
    CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, TrickleDown)
    CallbackEventHandler.UnregisterCallback<TEventType>(EventCallback<TEventType>, CallbackOptions)
    CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, TrickleDown)
    CallbackEventHandler.UnregisterCallback<TEventType, TUserArgsType>(EventCallback<TEventType, TUserArgsType>, CallbackOptions)
    CallbackEventHandler.UnregisterAllRemovableCallbacks()
    CallbackEventHandler.HasTrickleDownHandlers()
    CallbackEventHandler.HasBubbleUpHandlers()
    CallbackEventHandler.ExecuteDefaultActionAtTarget(EventBase)
    CallbackEventHandler.HandleEventBubbleUp(EventBase)
    CallbackEventHandler.HandleEventTrickleDown(EventBase)
    CallbackEventHandler.ExecuteDefaultAction(EventBase)
    CallbackEventHandler.NotifyPropertyChanged(in BindingId)
    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 abstract class NumericProperty<TValue, TField> : InputLabel, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IContextOverrideElement, IAdditionalDataHolder, IInputElement<TValue>, IValidatableElement<TValue>, INotifyValueChanged<TValue>, ISizeableElement where TValue : struct, IComparable, IComparable<TValue>, IFormattable where TField : NumericalField<TValue>, new()
    Type Parameters
    Name Description
    TValue

    The numeric value type.

    TField

    The NumericalField<TValue> implementation used as the value editor.

    Remarks

    NumericProperty is the inspector row of the design system. It derives from InputLabel, so it inherits the whole label/input layout — direction, required indicator, help text, leading icon and capValue — and it owns the NumericalField<TValue> placed inside it.

    The point of the type is that the label drag-scrub cannot be forgotten: draggable defaults to true here, so dragging the label horizontally always adjusts the field (Shift for a coarse step, Alt for a fine one). Build the same row by hand out of an InputLabel and a field and you can ship one whose label silently does nothing.

    Scalar only. Vector, rect and bounds rows scrub per-axis on their own sub-field labels, so pair those with a plain InputLabel.

    Use the concrete NumericPropertyFloat and NumericPropertyInt.

    Constructors

    NumericProperty()

    Default constructor.

    Declaration
    protected NumericProperty()

    Fields

    fieldUssClassName

    The NumericProperty field styling class.

    Declaration
    public const string fieldUssClassName = "appui-numericproperty__field"
    Field Value
    Type Description
    string

    ussClassName

    The NumericProperty main styling class.

    Declaration
    public const string ussClassName = "appui-numericproperty"
    Field Value
    Type Description
    string

    Properties

    field

    The numeric field used as the value editor.

    Declaration
    public TField field { get; }
    Property Value
    Type Description
    TField

    formatString

    The format string applied to the displayed value.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public string formatString { get; set; }
    Property Value
    Type Description
    string

    highValue

    The maximum allowed value, clamped on both a typed edit and a scrub.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public Optional<TValue> highValue { get; set; }
    Property Value
    Type Description
    Optional<TValue>

    invalid

    The invalid state of the property.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public bool invalid { get; set; }
    Property Value
    Type Description
    bool

    lowValue

    The minimum allowed value, clamped on both a typed edit and a scrub.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public Optional<TValue> lowValue { get; set; }
    Property Value
    Type Description
    Optional<TValue>

    size

    The size of the numeric field.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public Size size { get; set; }
    Property Value
    Type Description
    Size

    unit

    The unit suffix displayed by the numeric field. The suffix is a second scrub handle.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public string unit { get; set; }
    Property Value
    Type Description
    string

    validateValue

    The validation function applied to the value.

    Declaration
    [CreateProperty]
    public Func<TValue, bool> validateValue { get; set; }
    Property Value
    Type Description
    Func<TValue, bool>

    value

    The value of the property.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    public TValue value { get; set; }
    Property Value
    Type Description
    TValue

    Methods

    SetValueWithoutNotify(TValue)

    Set the value without notifying the listeners.

    Declaration
    public void SetValueWithoutNotify(TValue newValue)
    Parameters
    Type Name Description
    TValue newValue

    The new value.

    Implements

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

    Extension Methods

    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.HasAncestorOfType<T>(VisualElement, bool)
    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 © 2026 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)