Version: 2021.1
Controls
Bindings

Controls reference

The following table is a reference of all built-in controls available for UI(User Interface) Allows a user to interact with your application. Unity currently supports three UI systems. More info
See in Glossary
Toolkit.

Control Description Bindable Data Type Namespace Base Class
BoundsField A bounds value input field Yes UnityEngine.Bounds UnityEditor.UIElements BaseField<Bounds>
BoundsIntField An integer bounds value input field Yes UnityEngine.BoundsInt UnityEditor.UIElements BaseField<BoundsInt>
Box A simple outlined container element No UnityEngine.UIElements VisualElement
Button A clickable text element that executes an action when pressed Yes string UnityEngine.UIElements TextElement
ColorField A color value input field that allows color picking Yes UnityEngine.Color UnityEditor.UIElements BaseField<Color>
CurveField A curve value input field that shows a preview of the curve Yes UnityEngine.AnimationCurve UnityEditor.UIElements BaseField<AnimationCurve>
DoubleField A double value input field Yes double UnityEditor.UIElements TextValueField<double>
EnumField An enum value input field that shows a dropdown Yes Enum UnityEditor.UIElements BaseField<Enum>
EnumFlagsField An enum value input field with the Flag attribute Yes Enum UnityEngine.UIElements BaseMaskField<Enum>
FloatField A float value input field Yes float UnityEditor.UIElements TextValueField<float>
Foldout A container element that creates a collapsible section Yes bool UnityEngine.UIElements BindableElement
GradientField A gradient value input field Yes UnityEngine.Gradient UnityEditor.UIElements BaseField<Gradient>
Image A simple element that can represent an image or texture No UnityEngine.UIElements VisualElement
IntegerField An integer value input field Yes int UnityEditor.UIElements TextValueField<int>
Label A static text element Yes string UnityEngine.UIElements TextElement
LayerField A popup selection field that allows selection of a layer Yes int UnityEditor.UIElements PopupField<int>
LayerMaskField A popup selection field that allows selection of one or multiple layers Yes int UnityEditor.UIElements MaskField
ListView A container element that can display items as a reorderable list Yes IList, UnityEngine.VisualElement UnityEngine.UIElements BindableElement
LongField A long value input field Yes long UnityEditor.UIElements TextValueField<long>
MaskField A popup selection field that allows selection of one or multiple items Yes int UnityEditor.UIElements BaseMaskField<int>
MinMaxSlider A float-based slider input field that can represent a range Yes UnityEngine.Vector2 UnityEngine.UIElements BaseField<Vector2>
ObjectField A UnityEngine.Object value input field Yes UnityEngine.Object UnityEditor.UIElements BaseField<Object>
PopupField<T> A popup selection input field Yes typeof(T) UnityEditor.UIElements BasePopupField<T, T>
PopupWindow A popup selection field that matches the EditorGUILayout.Popup IMGUI element Yes string UnityEngine.UIElements TextElement
ProgressBar An element that shows a task progress Yes float, integer UnityEditor.UIElements BindableElement
PropertyField A value input field based on the type of the bound serialized property Yes various UnityEditor.UIElements VisualElement
RectField A rectangle/size value input field Yes UnityEngine.Rect UnityEditor.UIElements BaseCompositeField<Rect, FloatField, float>
RectIntField An integer-based rectangle/size value input field Yes UnityEngine.RectInt UnityEditor.UIElements BaseCompositeField<RectInt, IntegerField, int>
RepeatButton A clickable text element that executes an action repeatedly while it’s pressed Yes string UnityEngine.UIElements TextElement
Scroller A horizontal or vertical scroll bar element No UnityEngine.UIElements VisualElement
ScrollView A container element that displays its contents in a scrollable frame No UnityEngine.UIElements VisualElement
Slider A float-based range bound slider input field Yes float UnityEngine.UIElements BaseSlider<float>
SliderInt An integer-based range bound slider input field Yes int UnityEngine.UIElements BaseSlider<int>
TagField A popup selection field that allows single selection of tag items Yes string UnityEditor.UIElements PopupField<string>
TextElement A generic text element Yes string UnityEngine.UIElements BindableElement
TextField A string value input field Yes string UnityEngine.UIElements TextInputBaseField<string>
Toggle A clickable check box that can represent a binary state Yes bool UnityEngine.UIElements BaseField<bool>
Toolbar A container element that can display tools in a tools window No UnityEditor.UIElements VisualElement
TreeView A container element that can display items as a tree Yes UnityEngine.UIElements VisualElement
Vector2Field A two-dimensional vector value input field Yes UnityEngine.Vector2 UnityEditor.UIElements BaseCompositeField<Vector2, FloatField, float>
Vector2IntField A two-dimensional integer-based vector value input field Yes UnityEngine.Vector2Int UnityEditor.UIElements BaseCompositeField<Vector2Int, IntegerField, int>
Vector3Field A three-dimensional vector value input field Yes UnityEngine.Vector3 UnityEditor.UIElements BaseCompositeField<Vector3, FloatField, float>
Vector3IntField A three-dimensional integer-based vector value input field Yes UnityEngine.Vector3Int UnityEditor.UIElements BaseCompositeField<Vector3Int, IntegerField, int>
Vector4Field A four-dimensional vector value input field Yes UnityEngine.Vector4 UnityEditor.UIElements BaseCompositeField<Vector4, FloatField, float>
Controls
Bindings
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961