This topic details the UXML elements available in the UnityEngine.UIElements and UnityEditor.UIElements namespaces.
VisualElementBase class for all visual elements.
UnityEngine.UIElements
VisualElement
class: a list of space separated namesstyle: USS directives for styling the elementname: a unique string identifier for this elementfocus-index:(OBSOLETE) Use focusable and tabIndex.picking-mode: Position or Ignore; default value is Position
tooltip: a string displayed when the mouse hovers the elementfocusable: a boolean indicating whether the element is focusable. Default is false (not focusable).tabindex: an integer that defines the tabbing position of the element and the position in the tree. A positive value increases tabbing priority. The default is 0.view-data-key : a string that defines the key used for serialization of the element.BindableElementAn element that can be bound to a SerializedProperty. The value of the property and the value displayed are synchronized.
UnityEngine.UIElements
VisualElement
VisualElement
binding-path: the path of the property this element is bound toBoxSimilar to VisualElement but draws a box around its content.
UnityEngine.UIElements
VisualElement
VisualElement
TextElementAn element that displays text.
UnityEngine.UIElements
VisualElement
text: the text displayed by the elementLabelA text label.
UnityEngine.UIElements
TextElement
ImageDisplays an image.
UnityEngine.UIElements
VisualElement
IMGUIContainerElements that draws IMGUI content.
UnityEngine.UIElements
VisualElement
focus-index default value is 0
focusable default value is true
FoldoutElement that has a toggle button to show or hide its content.
UnityEngine.UIElements
VisualElement
BindableElement
TemplateA reference to another UXML template that can be instantiated using the Instance element.
UnityEngine.UIElements
name: a unique string identifier for this elementpath: the path of the UXML file to loadInstanceInstance of a Template.
UnityEngine.UIElements
template: the name of the Template to instantiateTemplateContainerA template container
UnityEngine.UIElements
BindableElement
template: a string identifier for this templateBaseField<T>The abstract base class of all fields.
UnityEngine.UIElements
BindableElement
focus-index default value is 0
focusable default value is true
label: the text of the label associated with the fieldBaseFieldTraits<ValueType, UxmlType>UnityEngine.UIElements
BaseField<ValueType>
value: the base value of the field, of type ValueType
ButtonA standard push button.
UnityEngine.UIElements
TextElement
RepeatButtonA button that executes an action repeatedly while pressed.
UnityEngine.UIElements
TextElement
delay: the initial delay in milliseconds before the action is executed;
default value is 0
interval: the interval in milliseconds between each action repetition;
default value is 0
ToggleA toggle button (checkbox).
UnityEngine.UIElements
BaseFieldTraits<bool, UxmlBoolAttributeDescription>
text : right side label of the toggle.ScrollerA scroll bar.
UnityEngine.UIElements
VisualElement
low-value: minimum value of the scrollerhigh-value: maximum value of the scrollerdirection: Horizontal or Vertical; default is Vertical
value: the position of the scroller cursorSliderA slider.
UnityEngine.UIElements
BaseFieldTraits<float, UxmlFloatAttributeDescription>
low-value: minimum value of the sliderhigh-value: maximum value of the sliderdirection: Horizontal or Vertical; default is Horizontal
page-size: page size of the sliderSliderIntA slider for integer values.
UnityEngine.UIElements
BaseFieldTraits<int, UxmlIntAttributeDescription>
low-value: minimum value of the sliderhigh-value: maximum value of the sliderdirection: Horizontal or Vertical; default is Horizontal
page-size: page size of the sliderMinMaxSliderA slider that let the user specify a minimum and a maximum value.
UnityEngine.UIElements
BaseField<Vector2>
low-limit: minimum value of the scrollerhigh-limit: maximum value of the scrollermin-value: the minimum value of the slider cursormax-value: the maximum value of the slider cursorEnumFieldA field that can only take the string values of an underlying Enum.
UnityEditor.UIElements
BaseField<Enum>
type: required, a string representing the C# type of the underlying Enum
value: a string representing the value of the fieldMaskFieldA popup menu that enables the user to select a group of values.
UnityEditor.UIElements
BaseField<int>
choices: a comma separated list of up to 32 choices to display in the popup menuvalue: an integer representing the value of the field as a 32 bits mask.LayerFieldA popup menu that enables the user to select a layerLayers in Unity can be used to selectively opt groups of GameObjects in or out of certain processes or calculations. This includes camera rendering, lighting, physics collisions, or custom calculations in your own code. More info
See in Glossary.
UnityEditor.UIElements
BaseField<int>
value: an integer representing the value of the field (the selected layer number).LayerMaskFieldA popup menu that enables the user to select a group of layers.
UnityEditor.UIElements
MaskField
TagFieldA popup menu that enables the user to select a tagA reference word which you can assign to one or more GameObjects to help you identify GameObjects for scripting purposes. For example, you might define and “Edible” Tag for any item the player can eat in your game. More info
See in Glossary.
UnityEditor.UIElements
BaseField<string>
value: a string representing the value of the field (the selected tag name).ProgressBarA progress bar that shows the progression of an operation
UnityEditor.UIElements
BindableElement
low-value: a float representing the lowest value of the progress bar (default is 0).high-value: a float representing the highest value of the progress bar (default is 100).title: a string representing the title of the progress bar.TextInputBaseField<TValueType>An abstract base class for all text fields.
UnityEngine.UIElements
BaseFieldTraits<string, UxmlStringAttributeDescription>
text: the text value of the fieldmax-length: the maximum number of characters that the field can contains. Default value of -1 sets no limits on the text length.password: a boolean indicating whether the field content should be
shown (false, the default) or displayed using the maskCharacter character.mask-character: character used to display the field content when password is true. Default is the character *.readonly: boolean indicating the field is readonly (default value : false)TextFieldAn editable text field.
UnityEngine.UIElements
TextInputBaseField<string>
multiline: a boolean indicating whether the text field displays its text on multiple lines (true) or on a single line, ignoring any line break in the text (false, the default).IntegerFieldA text field accepting an integer (32 bits) value.
UnityEditor.UIElements
BaseFieldTraits<int, UxmlIntAttributeDescription>
LongFieldA text field accepting a long integer (64 bits) value.
UnityEditor.UIElements
BaseFieldTraits<long, UxmlLongAttributeDescription>
FloatFieldA text field accepting a single precision floating point value.
UnityEditor.UIElements
BaseFieldTraits<float, UxmlFloatAttributeDescription>
DoubleFieldA text field accepting a double precision floating point value.
UnityEditor.UIElements
BaseFieldTraits<double, UxmlDoubleAttributeDescription>
Vector2FieldA set of two text fields accepting floating point values to
edit the value of a Vector2.
UnityEditor.UIElements
BaseField<Vector2>
x: the value of the X coordinatey: the value of the Y coordinateVector2IntFieldA set of two text fields accepting integer values to
edit the value of a Vector2Int.
UnityEditor.UIElements
BaseField<Vector2Int>
x: the value of the X coordinatey: the value of the Y coordinateVector3FieldA set of three text fields accepting floating point values to
edit the value of a Vector3.
UnityEditor.UIElements
BaseField<Vector3>
x: the value of the X coordinatey: the value of the Y coordinatez: the value of the Z coordinateVector3IntFieldA set of three text fields accepting integer values to
edit the value of a Vector3Int.
UnityEditor.UIElements
BaseField<Vector3Int>
x: the value of the X coordinatey: the value of the Y coordinatez: the value of the Z coordinateVector4FieldA set of four text fields accepting floating point values to
edit the value of a Vector4.
UnityEditor.UIElements
BaseField<Vector4>
x: the value of the X coordinatey: the value of the Y coordinatez: the value of the Z coordinatew: the value of the W coordinateRectFieldA set of four text fields accepting floating point values to edit the value of a rectangle.
UnityEditor.UIElements
BaseField<Rect>
x: the value of the top left corner X coordinatey: the value of the top left corner Y coordinatew: the width of the rectangleh: the height of the rectangleRectIntFieldA set of four text fields accepting integer values to edit the value of a rectangle.
UnityEditor.UIElements
BaseField<RectInt>
x: the value of the top left corner X coordinatey: the value of the top left corner Y coordinatew: the width of the rectangleh: the height of the rectangleBoundsFieldA set of six text fields accepting floating point values to edit the value of a bounding rectangle.
UnityEditor.UIElements
BaseField<Bounds>
cx: the value of the center X coordinatecy: the value of the center Y coordinatecz: the value of the center Z coordinateex: the value of the extent X coordinateey: the value of the extent Y coordinateez: the value of the extent Z coordinateBoundsIntFieldA set of six text fields accepting integer values to edit the value of a bounding rectangle.
UnityEditor.UIElements
BaseField<BoundsInt>
px: the value of the position X coordinatepy: the value of the position Y coordinatepz: the value of the position Z coordinatesx: the value of the size X coordinatesy: the value of the size Y coordinatesz: the value of the size Z coordinatePropertyFieldA label and a field to edit a value
UnityEditor.UIElements
VisualElement
binding-path: the path of the property this element is bound tolabel: the label for the fieldPropertyControl<int>A label and a field to edit a value of type int
UnityEditor.UIElements
BaseField<int>
value-type: a string representing the type of valuevalue: the value for the fieldPropertyControl<long>A label and a field to edit a value of type long
UnityEditor.UIElements
BaseField<long>
value-type: a string representing the type of valuevalue: the value for the fieldPropertyControl<float>A label and a field to edit a value of type float
UnityEditor.UIElements
BaseField<float>
value-type: a string representing the type of valuevalue: the value for the fieldPropertyControl<double>A label and a field to edit a value of type double
UnityEditor.UIElements
BaseField<double>
value-type: a string representing the type of valuevalue: the value for the fieldPropertyControl<string>A label and a field to edit a value of type string
UnityEditor.UIElements
BaseField<string>
value-type: a string representing the type of valuevalue: the value for the fieldColorFieldA color picker field.
UnityEditor.UIElements
BaseFieldTraits<Color, UxmlColorAttributeDescription>
show-eye-dropper: a boolean indicating whether to show (true, the default) the eye dropper or not (false).show-alpha: a boolean indicating whether to show the alpha control (true, the default) or not (false)hdr: a boolean indicating whether to use the high dynamic range color picker (true) or the normal one (false, the default)CurveFieldA curve editor field.
UnityEditor.UIElements
BaseField<AnimationCurve>
GradientFieldA gradient editor field.
UnityEditor.UIElements
BaseField<Gradient>
ObjectFieldAn object selector field.
UnityEditor.UIElements
BaseField<Object>
allow-scene-objects: a boolean indicating whether objects from the sceneA Scene contains the environments and menus of your game. Think of each unique Scene file as a unique level. In each Scene, you place your environments, obstacles, and decorations, essentially designing and building your game in pieces. More infotrue, the default) or not (false)InspectorElementAn element that displays a property in an inspectorA Unity window that displays information about the currently selected GameObject, Asset or Project Settings, alowing you to inspect and edit the values. More info
See in Glossary window.
UnityEditor.UIElements
VisualElement
BindableElement
ToolbarA container to hold toolbarA row of buttons and basic controls at the top of the Unity Editor that allows you to interact with the Editor in various ways (e.g. scaling, translation). More info
See in Glossary items.
UnityEditor.UIElements
VisualElement
VisualElement
ToolbarButtonA button for the toolbar.
UnityEditor.UIElements
Button
ToolbarToggleA toggle for the toolbar.
UnityEditor.UIElements
Toggle
ToolbarMenuA drop down menu for the toolbar. The menu has a single arrow pointing down.
UnityEditor.UIElements
TextElement
ToolbarSearchFieldA search field for the toolbar.
UnityEditor.UIElements
VisualElement
ToolbarPopupSearchFieldA search field with a popup menu of search options.
UnityEditor.UIElements
ToolbarSearchField
ToolbarSpacerAn element that insert a fixed amount of whitespace between toolbar buttons.
UnityEditor.UIElements
VisualElement
ListViewDisplays a list of elements.
UnityEngine.UIElements
ScrollViewA scrollable view, with horizontal and vertical scrollers.
UnityEngine.UIElements
VisualElement
VisualElement
mode: the mode of the scroll view, default to ScrollViewMode.Vertical
show-horizontal-scroller: a boolean indicating whether to show the
horizontal scroller; default false
show-vertical-scroller: a boolean indicating whether to show the vertical scroller; default `falsehorizontal-page-size: page size value of the horizontal scrollervertical-page-size: page size of the vertical scrollerTreeViewA view for displaying elements in a tree hierarchy
UnityEngine.UIElements
VisualElement
item-height: the height of an item in the underlying list shownPopupWindowA UIElements window, displayed on top of other content.
UnityEngine.UIElements
VisualElement
TextElement
Did you find this page useful? Please give it a rating: