Version: 2021.2
LanguageEnglish
  • C#

UnityEngine.UIElementsModule

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

The UIElements module implements the UIElements retained mode UI framework.

Classes

AbstractProgressBar Abstract base class for the ProgressBar.
AttachToPanelEvent Event sent after an element is added to an element that is a descendent of a panel.
BaseBoolField A BaseBoolField is a clickable element that represents a boolean value.
BaseField<T0> Abstract base class for controls.
BaseFieldTraits<T0,T1> Traits for the BaseField.
BaseSlider<T0> This is a base class for the Slider fields.
BaseVerticalCollectionView Base class for controls that display virtualized vertical content inside a scroll view.
BindableElement Element that can be bound to a property.
BlurEvent Event sent immediately after an element has lost focus. This event trickles down, it does not bubble up, and it cannot be cancelled.
Box Styled visual element to match the IMGUI Box Style.
Button This is a clickable button.
CallbackEventHandler Interface for classes capable of having callbacks to handle events.
ChangeEvent<T0> Sends an event when a value in a field changes.
Clickable Manipulator that tracks Mouse events on an element and callbacks when the elements is clicked.
ClickEvent This event is sent when the left mouse button is clicked.
CommandEventBase<T0> Base class for command events.
ContextClickEvent The event sent when clicking the right mouse button.
ContextualMenuManager Use this class to display a contextual menu.
ContextualMenuManipulator Manipulator that displays a contextual menu when the user clicks the right mouse button or presses the menu key on the keyboard.
ContextualMenuPopulateEvent The event sent when a contextual menu requires menu items.
CustomStyleResolvedEvent Event sent after the custom style properties of a VisualElement have been resolved.
DetachFromPanelEvent Event sent just before an element is detach from its parent, if the parent is the descendant of a panel.
DragAndDropEventBase<T0> Base class for drag and drop events.
DragEnterEvent Use the DragEnterEvent class to manage events that occur when dragging enters an element or one of its descendants. The DragEnterEvent is cancellable, it does not trickle down, and it does not bubble up.
DragExitedEvent The event sent to a dragged element when the drag and drop process ends.
DragLeaveEvent Use the DragLeaveEvent class to manage events sent when dragging leaves an element or one of its descendants. The DragLeaveEvent is cancellable, it does not trickle down, and it does not bubble up.
DragPerformEvent The event sent to an element when another element is dragged and dropped on the element.
DragUpdatedEvent The event sent when the element being dragged enters a possible drop target.
DropdownField A control that allows the user to pick a choice from a list of options.
DropdownMenu A drop-down menu.
DropdownMenuAction A menu action item.
DropdownMenuEventInfo This class provides information about the event that triggered displaying the drop-down menu.
DropdownMenuItem An item in a drop-down menu.
DropdownMenuSeparator A separator menu item.
DynamicAtlasSettings Contains the settings used by the dynamic atlas system.
Easing A collection of easing curves to be used with ValueAnimations.
EventBase The base class for all UIElements events.
EventBase<T0> Generic base class for events, implementing event pooling and automatic registration to the event type system.
EventDispatcher Dispatches events to a IPanel.
ExecuteCommandEvent The event sent when an element should execute a command.
Focusable Base class for objects that can get the focus.
FocusChangeDirection Base class for defining in which direction the focus moves in a focus ring.
FocusController Class in charge of managing the focus inside a Panel.
FocusEvent Event sent immediately after an element has gained focus. This event trickles down, it does not bubble up, and it cannot be cancelled.
FocusEventBase<T0> Base class for focus related events.
FocusInEvent Event sent immediately before an element gains focus. This event trickles down and bubbles up. This event cannot be cancelled.
FocusOutEvent Event sent immediately before an element loses focus. This event trickles down and bubbles up. This event cannot be cancelled.
Foldout A Foldout control is a collapsible section of a user interface. When toggled, it expands or collapses, which hides or reveals the elements it contains.
GenericDropdownMenu GenericDropdownMenu allows you to display contextual menus with default textual options or any VisualElement.
GeometryChangedEvent This event is sent after layout calculations, when the position or the dimension of an element changes.
GroupBox This is an enclosing container for a group of IGroupBoxOption. All group options within this container will interact together to allow a single selection, using the DefaultGroupManager. Default options are RadioButton, but users can provide other implementations. If no IGroupBox is found in the hierarchy, the default container will be the panel.
HelpBox Makes a help box with a message to the user.
IBindingExtensions Extensions methods to provide additional IBindable functionality.
Image A VisualElement representing a source texture.
IMGUIContainer Element that draws IMGUI content.
IMGUIEvent Class used to send a IMGUI event that has no equivalent UIElements event.
ImmediateModeElement VisualElement that can implement custom immediate mode rendering.
INotifyValueChangedExtensions INotifyValueChangedExtensions is a set of extension methods useful for objects implementing INotifyValueChanged_1.
InputEvent Sends an event when text from a TextField changes.
KeyboardEventBase<T0> This is the base class for keyboard events.
KeyboardNavigationManipulator Provides a default implementation for translating input device specific events to higher level navigation operations as commonly possible with a keyboard.
KeyDownEvent This event is sent when a key is pressed.
KeyUpEvent This event is sent when a pressed key is released.
Label Provides an Element displaying text.
ListView A ListView is a vertically scrollable area that links to, and displays, a list of items.
Manipulator Base class for all Manipulator implementations.
MeshGenerationContext Provides methods for generating a VisualElement's visual content during the generateVisualContent callback.
MeshWriteData A class that represents the vertex and index data allocated for drawing the content of a VisualElement.
MinMaxSlider A min/max slider containing a representation of a range.
MouseCaptureController Class that manages capturing mouse events.
MouseCaptureEvent Event sent after a handler starts capturing the mouse.
MouseCaptureEventBase<T0> Event sent when the handler capturing the mouse changes.
MouseCaptureOutEvent Event sent before a handler stops capturing the mouse.
MouseDownEvent This event is sent when a mouse button is pressed.
MouseEnterEvent Event sent when the mouse pointer enters an element or one of its descendent elements. The event is cancellable, it does not trickle down, and it does not bubble up.
MouseEnterWindowEvent Event sent when the mouse pointer enters a window. The event is cancellable, it does not trickle down, and it does not bubble up.
MouseEventBase<T0> The base class for mouse events.
MouseLeaveEvent Event sent when the mouse pointer exits an element and all its descendent elements. The event is cancellable, it does not trickle down, and it does not bubble up.
MouseLeaveWindowEvent Event sent when the mouse pointer exits a window. The event is cancellable, it does not trickle down, and it does not bubble up.
MouseManipulator MouseManipulators have a list of activation filters.
MouseMoveEvent This event is sent when the mouse moves.
MouseOutEvent Event sent when the mouse pointer exits an element. The event trickles down, it bubbles up, and it is cancellable.
MouseOverEvent Event sent when the mouse pointer enters an element. The event trickles down, it bubbles up, and it is cancellable.
MouseUpEvent This event is sent when a mouse button is released.
NavigationCancelEvent Event sent when the user presses the cancel button.
NavigationEventBase<T0> Navigation events abstract base class. By default, navigation events trickle down and bubble up. They are cancellable, and disabled elements won't receive these events.
NavigationMoveEvent Event typically sent when the user presses the D-pad, moves a joystick or presses the arrow keys.
NavigationSubmitEvent Event sent when the user presses the submit button.
PanelChangedEventBase<T0> Abstract base class for events notifying of a panel change.
PanelSettings Defines a Panel Settings asset that instantiates a panel at runtime. The panel makes it possible for Unity to display UXML-file based UI in the Game view.
PanelTextSettings Represents text rendering settings for a specific UI panel. PanelSettings.textSettings
PointerCancelEvent This event is sent when pointer interaction is cancelled.
PointerCaptureEvent Event sent when a pointer is captured by a VisualElement.
PointerCaptureEventBase<T0> Base class for pointer capture events and mouse capture events.
PointerCaptureHelper A static class to capture and release pointers.
PointerCaptureOutEvent Event sent when a VisualElement releases a pointer.
PointerDownEvent This event is sent when a pointer is pressed.
PointerEnterEvent This event is sent when a pointer enters a VisualElement or one of its descendants.
PointerEventBase<T0> This is the base class for pointer events.
PointerId A static class that holds pointer ID values.
PointerLeaveEvent This event is sent when a pointer exits an element and all of its descendants.
PointerManipulator PointerManipulators have a list of activation filters.
PointerMoveEvent This event is sent when a pointer changes state.
PointerOutEvent This event is sent when a pointer exits an element.
PointerOverEvent This event is sent when a pointer enters an element.
PointerStationaryEvent This event is sent when a pointer does not change for a set amount of time, determined by the operating system.
PointerType A static class that holds pointer type values.
PointerUpEvent This event is sent when a pointer's last pressed button is released.
PopupWindow Styled visual element that matches the EditorGUILayout.Popup IMGUI element.
ProgressBar A control that displays the progress between a lower and upper bound value.
RadioButton A control that allows users to select a single option inside a RadioButtonGroup
RadioButtonGroup A control that allows single selection out of a logical group of RadioButton elements. Selecting one will deselect the others.
RepeatButton A button that executes an action repeatedly while it is pressed.
RuntimePanelUtils A collection of static methods that provide simple World, Screen, and Panel coordinate transformations.
Scroller A vertical or horizontal scrollbar.
ScrollView Displays its contents inside a scrollable frame.
Slider A slider containing floating point values.
SliderInt A slider containing Integer discrete values.
StyleSheet Style sheets are applied to visual elements in order to control the layout and visual appearance of the user interface.
TemplateContainer Represents the root VisualElement of UXML file.
TextElement Use this as the super class if you are declaring a custom VisualElement that displays text. For example, Button or Label use this as their base class.
TextField A textfield is a rectangular area where the user can edit a string.
TextInputBaseField<T0> Abstract base class used for all text-based fields.
ThemeStyleSheet Represents a style sheet that's assembled from other style sheets.
Toggle A Toggle is a clickable element that represents a boolean value.
TooltipEvent Event sent to find the first VisualElement that displays a tooltip.
TransitionCancelEvent Event sent when a transition is canceled.
TransitionEndEvent Event sent at the completion of the transition. In the case where a transition is removed before completion then the event will not fire.
TransitionEventBase<T0> Transition events abstract base class.
TransitionRunEvent Event sent when a transition is created (i.e. added to the set of running transitions).
TransitionStartEvent Event sent when a transition's delay phase ends.
TwoPaneSplitView A SplitView that contains two resizable panes. One pane is fixed-size while the other pane has flex-grow style set to 1 to take all remaining space. The border between he panes is draggable to resize both panes. Both horizontal and vertical modes are supported. Requires _exactly_ two child elements to operate.
TypedUxmlAttributeDescription<T0> Base class for all the uxml specific attributes.
UIDocument Defines a Component that connects VisualElements to GameObjects. This makes it possible to render UI defined in UXML documents in the Game view.
UQuery UQuery is a set of extension methods allowing you to select individual or collection of visualElements inside a complex hierarchy.
UQueryExtensions UQuery is a set of extension methods allowing you to select individual or collection of visualElements inside a complex hierarchy.
UxmlAttributeDescription Base class for describing an XML attribute.
UxmlAttributeOverridesFactory Factory for the root AttributeOverrides element.
UxmlAttributeOverridesTraits Defines UxmlTraits for the AttributeOverrides tag.
UxmlBoolAttributeDescription Describes a XML bool attribute.
UxmlChildElementDescription Describe an allowed child element for an element.
UxmlColorAttributeDescription Describes a XML attribute representing a Color as a string.
UxmlDoubleAttributeDescription Describes a XML double attribute.
UxmlEnumAttributeDescription<T0> Describes a XML attribute representing an enum as a string.
UxmlEnumeration Restricts the value of an attribute to be taken from a list of values.
UxmlFactory<T0,T1> Generic base class for UXML factories, which instantiate a VisualElement using the data read from a UXML file.
UxmlFactory<T0> UxmlFactory specialization for classes that derive from VisualElement and that shares its traits, VisualElementTraits.
UxmlFloatAttributeDescription Describes a XML float attribute.
UxmlHash128AttributeDescription Describes a XML Hash128 attribute.
UxmlIntAttributeDescription Describes a XML int attribute.
UxmlLongAttributeDescription Describes a XML long attribute.
UxmlRootElementFactory Factory for the root UXML element.
UxmlRootElementTraits Defines UxmlTraits for the UXML root element.
UxmlStringAttributeDescription Describes a XML string attribute.
UxmlStyleFactory Factory for the root Style element.
UxmlStyleTraits Defines UxmlTraits for the Style tag.
UxmlTemplateFactory Factory for the root Template element.
UxmlTemplateTraits Defines UxmlTraits for the Template tag.
UxmlTraits Describes a VisualElement derived class for the parsing of UXML files and the generation of UXML schema definition.
UxmlTypeAttributeDescription<T0> Describes an XML System.Type attribute.
UxmlTypeRestriction Base class to restricts the value of an attribute.
UxmlValueBounds Restricts the value of an attribute to be within the specified bounds.
UxmlValueMatches Restricts the value of an attribute to match a regular expression.
ValidateCommandEvent The event sent to probe which elements accepts a command.
ValueAnimation<T0> Implementation object for transition animations.
VectorImage An asset that represents a vector image.
VisualElement Base class for objects that are part of the UIElements visual tree.
VisualElementExtensions VisualElementExtensions is a set of extension methods useful for VisualElement.
VisualElementFocusChangeDirection Define focus change directions for the VisualElementFocusRing.
VisualElementFocusRing Implementation of a linear focus ring. Elements are sorted according to their focusIndex.
VisualTreeAsset An instance of this class holds a tree of VisualElementAssets, created from a UXML file. Each node in the file corresponds to a VisualElementAsset. You can clone a VisualTreeAsset to yield a tree of VisualElements.
WheelEvent This event is sent when the mouse wheel moves.

Structs

Angle Represents an angle value.
Background Describes a VisualElement background.
CreationContext This structure holds information used during UXML template instantiation.
Cursor Script interface for VisualElement cursor style property IStyle.cursor.
CustomStyleProperty<T0> Define a custom style property for an element to be retrieved with CustomStyleResolvedEvent.
EasingFunction Determines how intermediate values are calculated for a transition.
EventDispatcherGate Gates control when the dispatcher processes events.
FontDefinition Describes a VisualElement font.
Length Represents a distance value.
ManipulatorActivationFilter Used by manipulators to match events against their requirements.
Rotate Provides rotation information for visual elements that rotates around the TransformOrigin. Positive values represent clockwise rotation.
Scale Reprensents the scale applied as an element's transformations. The center point that will not move when the scaling is applied is the TransformOrigin.
StyleBackground Style value that can be either a Background or a StyleKeyword.
StyleColor Style value that can be either a Color or a StyleKeyword.
StyleCursor Style value that can be either a Cursor or a StyleKeyword.
StyleEnum<T0> Style value that can be either an enum or a StyleKeyword.
StyleFloat Style value that can be either a float or a StyleKeyword.
StyleFont Style value that can be either a Font or a StyleKeyword.
StyleFontDefinition Style value that can be either a FontDefinition or a StyleKeyword.
StyleInt Style value that can be either an integer or a StyleKeyword.
StyleLength Style value that can be either a Length or a StyleKeyword.
StyleList<T0> Style value that can be either a list or a StyleKeyword.
StylePropertyName Defines the name of a style property.
StylePropertyNameCollection Collection of StylePropertyName.
StyleRotate Represents a style value that can be either a Rotate or a StyleKeyword.
StyleScale Style value that can be either a Scale or a StyleKeyword.
StyleTextShadow Style value that can be either a TextShadow or a StyleKeyword.
StyleTransformOrigin Represents a style value that can be either a TransformOrigin or a StyleKeyword.
StyleTranslate Style value that can be either a Translate or a StyleKeyword.
StyleValues Container object used to animate multiple style values at once.
TextShadow Script interface for VisualElement text-shadow style property IStyle.textShadow.
TimerState Contains timing information of scheduler events.
TimeValue Represents a time value.
TransformOrigin Represents the point of origin where the (Scale, Translate, Rotate) transformations are applied.
Translate Represents a translation of the object. Percentage values in X and Y are relative to the width and height of the visual element where the style value is applied.
TreeViewItemData<T0> Item structure provided to a TreeView using the default implementation.
UQueryBuilder<T0> Utility Object that contructs a set of selection rules to be ran on a root visual element.
UQueryState<T0> Query object containing all the selection rules. The object can be saved and rerun later without re-allocating memory.
Vertex Represents a vertex of geometry for drawing content of VisualElement.
VisualElementStyleSheetSet This structure manipulates the set of StyleSheet objects attached to the owner VisualElement.

Enumerations

Align Defines the alignement behavior along an axis.
AlternatingRowBackground Options to display alternating background colors for ListView rows.
AngleUnit Unit of measurement used to express the value of an Angle.
CollectionVirtualizationMethod Options to change the virtualization method used by the ListView to display its content.
ContextType Describes in which context a VisualElement hierarchy is being ran.
DisplayStyle Defines how an element is displayed in the layout.
DynamicAtlasFilters Options to enable or disable filters for the dynamic atlas.
EasingMode Represents a mathematical function that describes the rate at which a numerical value changes.
FlexDirection Defines the main-axis of the flex layout.
HelpBoxMessageType User message types.
Justify Defines the alignment along the main axis, how is extra space distributed.
KeyboardNavigationOperation Represents an operation that the user is trying to accomplish through a specific input mechanism.
LengthUnit Describes how to interpret a Length value.
ListViewReorderMode Options to change the drag and drop mode for items in the ListView.
MouseButton Describes a MouseButton.
Overflow Defines what should happend if content overflows an element bounds.
OverflowClipBox Boxes against which the VisualElement content is clipped.
PanelScaleMode Options that specify how elements in the panel scale when the screen size changes. See PanelSettings.scaleMode.
PanelScreenMatchMode Options that specify how to scale the panel area when the aspect ratio of the current screen resolution does not match the reference resolution. See PanelSettings.screenMatchMode.
PickingMode Describes the picking behavior.
Position Defaines how the position values are interpreted by the layout engine.
PropagationPhase The propagation phases of an event.
ScrollerVisibility Options for controlling the visibility of scroll bars in the ScrollView.
ScrollViewMode Configurations of the ScrollView to influence the layout of its contents and how scrollbars appear. ScrollView.mode
SelectionType Controls how many items can be selected at once.
SliderDirection This is the direction of the Slider and SliderInt.
StyleKeyword Keyword that can be used on any style value types.
TextOverflow Specifies how the text Element treats hidden overflow content.
TextOverflowPosition Specifies which part of the text the Element replaces with an ellipsis when textOverflow is set to TextOverflow.Ellipsis.
TimeUnit Describes how to interpret a TimeValue.
TransformOriginOffset Specifies the alignment keywords for TransformOrigin.
TrickleDown Use this enum to specify during which phases the event handler is executed.
TwoPaneSplitViewOrientation Determines the orientation of the two resizable panes.
UsageHints Offers a set of values that describe the intended usage patterns of a specific VisualElement.
Visibility Specifies whether or not a VisualElement is visible.
WhiteSpace Word wrapping over multiple lines if not enough space is available to draw the text of an element.
Wrap By default, items will all try to fit onto one line. You can change that and allow the items to wrap as needed with this property.
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961