This topic details the UXML elements available in the UnityEngine.Experimental.UIElements and UnityEditor.Experimental.UIElements namespaces.
VisualElementBase class for all visual elements.
UnityEngine.Experimental.UIElements
VisualElement
class: a list of space separated namesstyle: USS directives for styling the elementname: a unique string identifier for this elementfocus-index: an integer used to determine the focus order when tabbing; default value is -1 meaning that the element is not focusablepicking-mode: Position or Ignore; default value is Position
tooltip: a string displayed when the mouse hovers the elementslot-name: defines this elements as a slotslot: when the element is inside an <Instance>, move the element inside the slot referenced by this attributeBindableElementAn element that can be bound to a SerializedProperty. The value of the property and the value displayed are synchronized.
UnityEngine.Experimental.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.Experimental.UIElements
VisualElement
VisualElement
TextElementAn element that displays text.
UnityEngine.Experimental.UIElements
VisualElement
text: the text displayed by the elementLabelA text label.
UnityEngine.Experimental.UIElements
TextElement
ImageDisplays an image.
UnityEngine.Experimental.UIElements
VisualElement
IMGUIContainerElements that draws IMGUI content.
UnityEngine.Experimental.UIElements
VisualElement
focus-index default value is 0
FoldoutElement that has a toggle button to show or hide its content.
UnityEngine.Experimental.UIElements
VisualElement
BindableElement
TemplateA reference to another UXML template that can be instantiated using the Instance element.
UnityEngine.Experimental.UIElements
name: a unique string identifier for this elementpath: the path of the UXML file to loadInstanceInstance of a Template.
UnityEngine.Experimental.UIElements
template: the name of the Template to instantiateButtonA standard push button.
UnityEngine.Experimental.UIElements
TextElement
RepeatButtonA button that executes an action repeatedly while pressed.
UnityEngine.Experimental.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.Experimental.UIElements
BindableElement
focus-index default value is 0
label: the text label for the togglevalue: a boolean indicating whether the toggle in on or off.ScrollerA scroll bar.
UnityEngine.Experimental.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 cursorScrollerButtonA button at the end of a scroll bar.
UnityEngine.Experimental.UIElements
VisualElement
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
SliderA slider.
UnityEngine.Experimental.UIElements
BindableElement
low-value: minimum value of the sliderhigh-value: maximum value of the sliderdirection: Horizontal or Vertical; default is Vertical
page-size: page size of the slidervalue: the position of the slider cursorSliderIntA slider for integer values.
UnityEngine.Experimental.UIElements
BindableElement
low-value: minimum value of the sliderhigh-value: maximum value of the sliderdirection: Horizontal or Vertical; default is Vertical
page-size: page size of the slidervalue: the position of the slider cursorMinMaxSliderA slider that let the user specify a minimum and a maximum value.
UnityEngine.Experimental.UIElements
BindableElement
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.Experimental.UIElements
BindableElement
focus-index default value is 0
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.Experimental.UIElements
BindableElement
focus-index default value is 0
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 layer.
UnityEditor.Experimental.UIElements
BindableElement
focus-index default value is 0
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.Experimental.UIElements
MaskField
TagFieldA popup menu that enables the user to select a tag.
UnityEditor.Experimental.UIElements
BindableElement
focus-index default value is 0
value: a string representing the value of the field (the selected tag name).TextFieldAn editable text field.
UnityEngine.Experimental.UIElements
BindableElement
focus-index default value is 0
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 *.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.Experimental.UIElements
BindableElement
focus-index default value is 0
value: the value of the fieldtext: 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 *.LongFieldA text field accepting a long integer (64 bits) value.
UnityEditor.Experimental.UIElements
BindableElement
focus-index default value is 0
value: the value of the fieldtext: 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 *.FloatFieldA text field accepting a single precision floating point value.
UnityEditor.Experimental.UIElements
BindableElement
focus-index default value is 0
value: the value of the fieldtext: 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 *.DoubleFieldA text field accepting a double precision floating point value.
UnityEditor.Experimental.UIElements
BindableElement
focus-index default value is 0
value: the value of the fieldtext: 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 *.Vector2FieldA set of two text fields accepting floating point values to
edit the value of a Vector2.
UnityEditor.Experimental.UIElements
BindableElement
focus-index default value is 0
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.Experimental.UIElements
BindableElement
focus-index default value is 0
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.Experimental.UIElements
BindableElement
focus-index default value is 0
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.Experimental.UIElements
BindableElement
focus-index default value is 0
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.Experimental.UIElements
BindableElement
focus-index default value is 0
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.Experimental.UIElements
BindableElement
focus-index default value is 0
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.Experimental.UIElements
BindableElement
focus-index default value is 0
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.Experimental.UIElements
BindableElement
focus-index default value is 0
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.Experimental.UIElements
BindableElement
focus-index default value is 0
px: the value of the center X coordinatepy: the value of the center Y coordinatepz: the value of the center Z coordinatesx: the value of the extent X coordinatesy: the value of the extent Y coordinatesz: the value of the extent Z coordinatePropertyFieldA label and a field to edit a value.
UnityEditor.Experimental.UIElements
VisualElement
focus-index default value is 0
binding-path: the path of the property this element is bound tolabel: the label for the fieldColorFieldA color picker field.
UnityEditor.Experimental.UIElements
BindableElement
focus-index default value is 0
value: the color value, as a Color
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.Experimental.UIElements
BindableElement
focus-index default value is 0
GradientFieldA gradient editor field.
UnityEditor.Experimental.UIElements
BindableElement
focus-index default value is 0
ObjectFieldAn object selector field.
UnityEditor.Experimental.UIElements
BindableElement
focus-index default value is 0
allow-scene-objects: a boolean indicating whether objects from the scene can be selected (true, the default) or not (false)InspectorElementAn element that displays a property in an inspector window.
UnityEditor.Experimental.UIElements
VisualElement
BindableElement
ToolbarA container to hold toolbar items.
UnityEditor.Experimental.UIElements
VisualElement
VisualElement
ToolbarButtonA button for the toolbar.
UnityEditor.Experimental.UIElements
Button
ToolbarToggleA toggle for the toolbar.
UnityEditor.Experimental.UIElements
Toggle
ToolbarMenuA drop down menu for the toolbar. The menu has a single arrow pointing down.
UnityEditor.Experimental.UIElements
TextElement
ToolbarPopupA popup menu for the toolbar. The menu has a two arrows pointing up and down.
UnityEditor.Experimental.UIElements
TextElement
ToolbarSearchFieldA search field for the toolbar.
UnityEditor.Experimental.UIElements
VisualElement
ToolbarPopupSearchFieldA search field with a popup menu of search options.
UnityEditor.Experimental.UIElements
ToolbarSearchField
ToolbarSpacerAn element that insert a fixed amount of whitespace between toolbar buttons.
UnityEditor.Experimental.UIElements
VisualElement
ToolbarFlexSpacerElements that insert a flexible whitespace between toolbar buttons.
UnityEditor.Experimental.UIElements
VisualElement
ListViewDisplays a list of elements.
UnityEngine.Experimental.UIElements
VisualElement
item-height: the height in pixel of each item in the listScrollViewA scrollable view, with horizontal and vertical scrollers.
UnityEngine.Experimental.UIElements
VisualElement
VisualElement
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 scrollerstretch-content-width: a boolean indicating whether the content should stretch to the width of the viewPopupWindowA UIElements window, displayed on top of other content.
UnityEngine.Experimental.UIElements
VisualElement
TextElement
VisualSplitterA container that allow user to resize its children by dragging a split bar.
UnityEditor.Experimental.UIElements
VisualElement
VisualElement