docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class BoundsIntField

    A UI component that allows users to input and edit integer bounds values with position and size in 3D space.

    Inheritance
    object
    CallbackEventHandler
    Focusable
    VisualElement
    BaseVisualElement
    BoundsIntField
    Implements
    IEventHandler
    IResolvedStyle
    ITransform
    ITransitionAnimations
    IExperimentalFeatures
    IVisualElementScheduler
    IContextOverrideElement
    IAdditionalDataHolder
    IInputElement<BoundsInt>
    IValidatableElement<BoundsInt>
    ISizeableElement
    INotifyValueChanging<BoundsInt>
    INotifyValueChanged<BoundsInt>
    Inherited Members
    BaseVisualElement.contextPrefix
    BaseVisualElement.scaleOverride
    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
    [UxmlElement]
    public class BoundsIntField : BaseVisualElement, IEventHandler, IResolvedStyle, ITransform, ITransitionAnimations, IExperimentalFeatures, IVisualElementScheduler, IContextOverrideElement, IAdditionalDataHolder, IInputElement<BoundsInt>, IValidatableElement<BoundsInt>, ISizeableElement, INotifyValueChanging<BoundsInt>, INotifyValueChanged<BoundsInt>
    Remarks

    The BoundsIntField is a specialized input component designed for editing BoundsInt values in Unity applications. It provides a user-friendly interface for manipulating 3D bounds defined by integer coordinates, consisting of a position (x, y, z) and size (width, height, depth).

    The component is organized into two rows: one for position coordinates and another for size dimensions. Each row contains three integer input fields for the respective x, y, and z values.

    The BoundsIntField is particularly useful when working with grid-based systems, tile maps, or any scenario requiring precise integer-based 3D boundaries.

    Examples

    Basic usage example showing how to create and configure a BoundsIntField.

    Creating a BoundsIntField with validation and change callback.

    var boundsField = new BoundsIntField();
    boundsField.value = new BoundsInt(Vector3Int.zero, new Vector3Int(1, 1, 1));
    boundsField.validateValue = (bounds) => bounds.size.x > 0 && bounds.size.y > 0 && bounds.size.z > 0;
    

    // Register to value changes boundsField.RegisterValueChangedCallback(evt => { Debug.Log($"New bounds: Pos(), Size()"); });

    UXML definition example.

    Defining a BoundsIntField in UXML.

    <UXML xmlns:appui="Unity.AppUI.UI">
        <appui:BoundsIntField
            size="M"
            value="0,0,0,1,1,1"
            name="myBoundsField"
        />
    </UXML>

    USS styling example.

    Styling the BoundsIntField with USS.

    .appui-boundsfield {
        margin: 8px;
    }
    

    .appui-boundsfield__row { flex-direction: row; align-items: center; }

    .appui-boundsfield__label { min-width: 60px; }

    Constructors

    BoundsIntField()

    Default constructor.

    Declaration
    public BoundsIntField()

    Fields

    labelUssClassName

    The BoundsIntField Label styling class.

    Declaration
    public const string labelUssClassName = "appui-boundsfield__label"
    Field Value
    Type Description
    string

    rowUssClassName

    The BoundsIntField row styling class.

    Declaration
    public const string rowUssClassName = "appui-boundsfield__row"
    Field Value
    Type Description
    string

    sizeUssClassName

    The BoundsIntField size styling class.

    Declaration
    public const string sizeUssClassName = "appui-boundsfield--size-"
    Field Value
    Type Description
    string

    sxFieldUssClassName

    The BoundsIntField X NumericalField styling class.

    Declaration
    public const string sxFieldUssClassName = "appui-boundsfield__sx-field"
    Field Value
    Type Description
    string

    syFieldUssClassName

    The BoundsIntField Y NumericalField styling class.

    Declaration
    public const string syFieldUssClassName = "appui-boundsfield__sy-field"
    Field Value
    Type Description
    string

    szFieldUssClassName

    The BoundsIntField Z NumericalField styling class.

    Declaration
    public const string szFieldUssClassName = "appui-boundsfield__sz-field"
    Field Value
    Type Description
    string

    ussClassName

    The BoundsIntField main styling class.

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

    xFieldUssClassName

    The BoundsIntField X NumericalField styling class.

    Declaration
    public const string xFieldUssClassName = "appui-boundsfield__x-field"
    Field Value
    Type Description
    string

    yFieldUssClassName

    The BoundsIntField Y NumericalField styling class.

    Declaration
    public const string yFieldUssClassName = "appui-boundsfield__y-field"
    Field Value
    Type Description
    string

    zFieldUssClassName

    The BoundsIntField Z NumericalField styling class.

    Declaration
    public const string zFieldUssClassName = "appui-boundsfield__z-field"
    Field Value
    Type Description
    string

    Properties

    contentContainer

    The content container of the BoundsIntField. Always null.

    Declaration
    public override VisualElement contentContainer { get; }
    Property Value
    Type Description
    VisualElement
    Overrides
    VisualElement.contentContainer

    invalid

    Set the validation state of the BoundsIntField.

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

    size

    The BoundsIntField size.

    Declaration
    [CreateProperty]
    [UxmlAttribute]
    [Header("BoundsInt Field")]
    public Size size { get; set; }
    Property Value
    Type Description
    Size

    validateValue

    The validation function to use on the BoundsIntField value.

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

    value

    The BoundsIntField value.

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

    Methods

    GetSizeUssClassName(Size)

    Declaration
    public static string GetSizeUssClassName(Size enumValue)
    Parameters
    Type Name Description
    Size enumValue
    Returns
    Type Description
    string

    SetValueWithoutNotify(BoundsInt)

    Sets the BoundsIntField value without notifying any change event listeners.

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

    The new value to set.

    Implements

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

    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.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)