Version: 2021.1
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

AttachToPanelEventEvent sent after an element is added to an element that is a descendent of a panel.
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.
BindableElementElement that can be bound to a property.
BlurEventEvent sent immediately after an element has lost focus. This event trickles down, it does not bubble up, and it cannot be cancelled.
BoxStyled visual element to match the IMGUI Box Style.
ButtonA clickable button.
CallbackEventHandlerInterface for classes capable of having callbacks to handle events.
ChangeEvent<T0>Sends an event when a value in a field changes.
ClickableManipulator that tracks Mouse events on an element and callbacks when the elements is clicked.
ClickEventThe event sent when the left mouse button is clicked.
CommandEventBase<T0>Base class for command events.
ContextClickEventThe event sent when clicking the right mouse button.
ContextualMenuManagerUse this class to display a contextual menu.
ContextualMenuManipulatorManipulator that displays a contextual menu when the user clicks the right mouse button or presses the menu key on the keyboard.
ContextualMenuPopulateEventThe event sent when a contextual menu requires menu items.
CustomStyleResolvedEventEvent sent after the custom style properties of a VisualElement have been resolved.
DetachFromPanelEventEvent 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.
DragEnterEventUse 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.
DragExitedEventThe event sent to a dragged element when the drag and drop process ends.
DragLeaveEventUse 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.
DragPerformEventThe event sent to an element when another element is dragged and dropped on the element.
DragUpdatedEventThe event sent when the element being dragged enters a possible drop target.
DropdownMenuA drop-down menu.
DropdownMenuActionA menu action item.
DropdownMenuEventInfoThis class provides information about the event that triggered displaying the drop-down menu.
DropdownMenuItemAn item in a drop-down menu.
DropdownMenuSeparatorA separator menu item.
EasingA collection of easing curves to be used with ValueAnimations.
EventBaseThe base class for all UIElements events.
EventBase<T0>Generic base class for events, implementing event pooling and automatic registration to the event type system.
EventDispatcherDispatches events to a IPanel.
ExecuteCommandEventThe event sent when an element should execute a command.
FocusableBase class for objects that can get the focus.
FocusChangeDirectionBase class for defining in which direction the focus moves in a focus ring.
FocusControllerClass in charge of managing the focus inside a Panel.
FocusEventEvent 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.
FocusInEventEvent sent immediately before an element gains focus. This event trickles down and bubbles up. This event cannot be cancelled.
FocusOutEventEvent sent immediately before an element loses focus. This event trickles down and bubbles up. This event cannot be cancelled.
FoldoutCollapsable section of UI.
GeometryChangedEventEvent sent after layout calculations, when the position or the dimension of an element changes. This event cannot be cancelled, it does not trickle down, and it does not bubble up.
HelpBoxMakes a help box with a message to the user.
IBindingExtensionsExtensions methods to provide additional IBindable functionality.
ImageA VisualElement representing a source texture.
IMGUIContainerElement that draws IMGUI content.
IMGUIEventClass used to send a IMGUI event that has no equivalent UIElements event.
ImmediateModeElementVisualElement that can implement custom immediate mode rendering.
INotifyValueChangedExtensionsINotifyValueChangedExtensions is a set of extension methods useful for objects implementing INotifyValueChanged.
InputEventSends an event when text from a TextField changes.
KeyboardEventBase<T0>Base class for keyboard events.
KeyDownEventEvent sent when a key is pressed on the keyboard. This event trickles down and bubbles up. This event is cancellable.
KeyUpEventEvent sent when a key is released on the keyboard. This event trickles down and bubbles up. This event is cancellable.
LabelProvides an Element displaying text.
ListViewA vertically scrollable area that only creates visual elements for visible items while allowing the binding of many more items. As the user scrolls, visual elements are recycled and re-bound to new data items.
ManipulatorBase class for all Manipulator implementations.
MeshGenerationContextOffers functionality for generating visual content of a VisualElement during the generateVisualContent callback.
MeshWriteDataA class that represents the vertex and index data allocated for drawing the content of a VisualElement.
MinMaxSliderA min/max slider containing a representation of a range.
MouseCaptureControllerClass that manages capturing mouse events.
MouseCaptureEventEvent sent after a handler starts capturing the mouse.
MouseCaptureEventBase<T0>Event sent when the handler capturing the mouse changes.
MouseCaptureOutEventEvent sent before a handler stops capturing the mouse.
MouseDownEventMouse down event.
MouseEnterEventEvent 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.
MouseEnterWindowEventEvent 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.
MouseLeaveEventEvent 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.
MouseLeaveWindowEventEvent sent when the mouse pointer exits a window. The event is cancellable, it does not trickle down, and it does not bubble up.
MouseManipulatorMouseManipulators have a list of activation filters.
MouseMoveEventMouse move event.
MouseOutEventEvent sent when the mouse pointer exits an element. The event trickles down, it bubbles up, and it is cancellable.
MouseOverEventEvent sent when the mouse pointer enters an element. The event trickles down, it bubbles up, and it is cancellable.
MouseUpEventMouse up event.
PanelChangedEventBase<T0>Abstract base class for events notifying of a panel change.
PointerCancelEventEvent sent when pointer interaction is cancelled.
PointerCaptureEventEvent sent when a pointer is captured by a VisualElement.
PointerCaptureEventBase<T0>Base class for pointer capture events and mouse capture events.
PointerCaptureHelperA static class to capture and release pointers.
PointerCaptureOutEventEvent sent when a VisualElement releases a pointer.
PointerDownEventEvent sent when a pointer is pressed.
PointerEnterEventEvent sent when a pointer enters a VisualElement or one of its descendant.
PointerEventBase<T0>Base class for pointer events.
PointerIdA static class that holds pointer ID values.
PointerLeaveEventEvent sent when a pointer exits an element and all of its descendant.
PointerManipulatorPointerManipulators have a list of activation filters.
PointerMoveEventEvent sent when a pointer changes state.
PointerOutEventEvent sent when a pointer exits an element.
PointerOverEventEvent sent when a pointer enters a VisualElement.
PointerStationaryEventAn event sent when a pointer does not change for a set amount of time determined by the operating system.
PointerTypeA static class that holds pointer type values.
PointerUpEventEvent sent when the last depressed button of a pointer is released.
PopupWindowStyled visual element that matches the EditorGUILayout.Popup IMGUI element.
ProgressBarProgressBar control using UIElements. Supports binding to float and int values.
RepeatButtonA button that executes an action repeatedly while it is pressed.
ScrollerA vertical or horizontal scrollbar.
ScrollViewDisplays its contents inside a scrollable frame.
SliderA slider containing floating point values.
SliderIntA slider containing Integer discrete values.
StyleSheetStyle sheets are applied to visual elements in order to control the layout and visual appearance of the user interface.
TemplateContainerTemplate Container.
TextElementAbstract base class for VisualElement containing text.
TextFieldA textfield is a rectangular area where the user can edit a string.
TextInputBaseField<T0>Abstract base class used for all text-based fields.
ThemeStyleSheetThe theme style sheet is a collection of themes, style sheets, and rules used to define default UI appearance.
ToggleThis is the Toggle field.
TooltipEventEvent sent to find the first VisualElement that displays a tooltip.
TypedUxmlAttributeDescription<T0>Base class for all the uxml specific attributes.
UQueryUQuery is a set of extension methods allowing you to select individual or collection of visualElements inside a complex hierarchy.
UQueryExtensionsUQuery is a set of extension methods allowing you to select individual or collection of visualElements inside a complex hierarchy.
UxmlAttributeDescriptionBase class for describing an XML attribute.
UxmlAttributeOverridesFactoryFactory for the root AttributeOverrides element.
UxmlAttributeOverridesTraitsDefines UxmlTraits for the <AttributeOverrides> tag.
UxmlBoolAttributeDescriptionDescribes a XML bool attribute.
UxmlChildElementDescriptionDescribe an allowed child element for an element.
UxmlColorAttributeDescriptionDescribes a XML attribute representing a Color as a string.
UxmlDoubleAttributeDescriptionDescribes a XML double attribute.
UxmlEnumAttributeDescription<T0>Describes a XML attribute representing an enum as a string.
UxmlEnumerationRestricts 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.
UxmlFloatAttributeDescriptionDescribes a XML float attribute.
UxmlHash128AttributeDescriptionDescribes a UXML attribute that represents a Hash128 as a string.
UxmlIntAttributeDescriptionDescribes a XML int attribute.
UxmlLongAttributeDescriptionDescribes a XML long attribute.
UxmlRootElementFactoryFactory for the root UXML element.
UxmlRootElementTraitsDefines UxmlTraits for the UXML root element.
UxmlStringAttributeDescriptionDescribes a XML string attribute.
UxmlStyleFactoryFactory for the root Style element.
UxmlStyleTraitsDefines UxmlTraits for the <Style> tag.
UxmlTemplateFactoryFactory for the root Template element.
UxmlTemplateTraitsDefines UxmlTraits for the <Template> tag.
UxmlTraitsDescribes 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.
UxmlTypeRestrictionBase class to restricts the value of an attribute.
UxmlValueBoundsRestricts the value of an attribute to be within the specified bounds.
UxmlValueMatchesRestricts the value of an attribute to match a regular expression.
ValidateCommandEventThe event sent to probe which elements accepts a command.
ValueAnimation<T0>Implementation object for transition animations.
VectorImageAn asset that represents a vector image.
VisualElementBase class for objects that are part of the UIElements visual tree.
VisualElementExtensionsVisualElementExtensions is a set of extension methods useful for VisualElement.
VisualElementFocusChangeDirectionDefine focus change directions for the VisualElementFocusRing.
VisualElementFocusRingImplementation of a linear focus ring. Elements are sorted according to their focusIndex.
VisualTreeAssetAn instance of this class holds a tree of `VisualElementAsset`s, created from a UXML file. Each node in the file corresponds to a `VisualElementAsset`. You can clone a `VisualTreeAsset` to yield a tree of `VisualElement`s.
WheelEventMouse wheel event.

Structs

BackgroundDescribes a VisualElement background.
CreationContextThis class is used during UXML template instantiation.
CursorScript interface for VisualElement cursor style property IStyle.cursor.
CustomStyleProperty<T0>Define a custom style property for an element to be retrieved with CustomStyleResolvedEvent.
EventDispatcherGateGates control when the dispatcher processes events.
LengthReprensents a distance value.
ManipulatorActivationFilterUsed by manipulators to match events against their requirements.
StyleBackgroundStyle value that can be either a Background or a StyleKeyword.
StyleColorStyle value that can be either a Color or a StyleKeyword.
StyleCursorStyle value that can be either a Cursor or a StyleKeyword.
StyleEnum<T0>Style value that can be either an enum or a StyleKeyword.
StyleFloatStyle value that can be either a float or a StyleKeyword.
StyleFontStyle value that can be either a Font or a StyleKeyword.
StyleIntStyle value that can be either an integer or a StyleKeyword.
StyleLengthStyle value that can be either a Length or a StyleKeyword.
StyleValuesContainer object used to animate multiple style values at once.
TimerStateContains timing information of scheduler events.
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. Can be saved and rerun later without re-allocating memory.
VertexRepresents a vertex of geometry for drawing content of VisualElement.
VisualElementStyleSheetSetThis structure manipulates the set of StyleSheet objects attached to the owner VisualElement.

Enumerations

AlignDefines the alignement behavior along an axis.
AlternatingRowBackgroundOptions for displaying alternating background colors for ListView rows.
ContextTypeDescribes in which context a VisualElement hierarchy is being ran.
DisplayStyleDefines how an element is displayed in the layout.
FlexDirectionDefines the main-axis of the flex layout.
HelpBoxMessageTypeUser message types.
JustifyDefines the alignment along the main axis, how is extra space distributed.
LengthUnitDescribes how to interpret a Length value.
MouseButtonDescribes a MouseButton.
OverflowDefines what should happend if content overflows an element bounds.
OverflowClipBoxBoxes against which the VisualElement content is clipped.
PickingModeDescribes the picking behavior.
PositionDefaines how the position values are interpreted by the layout engine.
PropagationPhaseThe propagation phases of an event.
ScrollViewModeMode configuring the ScrollView for the intended usage.
SelectionTypeControls how many items can be selected at once.
SliderDirectionThis is the direction of the Slider and SliderInt.
StyleKeywordKeyword that can be used on any style value types.
TextOverflowSpecifies how the text Element treats hidden overflow content.
TextOverflowPositionSpecifies which part of the text the Element replaces with an ellipsis when textOverflow is set to TextOverflow.Ellipsis.
TrickleDownUse this enum to specify during which phases the event handler is executed.
UsageHintsOffers a set of values that describe the intended usage patterns of a specific VisualElement.
VisibilitySpecifies whether or not a VisualElement is visible.
WhiteSpaceWord wrapping over multiple lines if not enough space is available to draw the text of an element.
WrapBy 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