UIDocument
Defines a Component that connects VisualElements to GameObjects. This makes it possible to render UI defined in UXML documents in the Game view.
Read time 7 minutesLast updated 2 days ago
Definition
- Type: Class
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
- Inherits from: MonoBehaviour
[HelpURL("UIE-get-started-with-runtime-ui")][AddComponentMenu("UI Toolkit/UI Document")][DefaultExecutionOrder(-100)]public sealed class UIDocument : MonoBehaviour
Properties
Property | Description |
|---|---|
| panelSettings | Specifies the PanelSettings instance to connect this UIDocument component to. |
| parentUI | If the GameObject that this UIDocument component is attached to has a parent GameObject, and that parent GameObject also has a UIDocument component attached to it, this value is set to the parent GameObject's UIDocument component automatically. |
| rootVisualElement | The root visual element where the UI hierarchy starts. |
| runtimePanel | The runtime panel that this UIDocument is attached to. |
| sortingOrder | The order in which this UIDocument will show up on the hierarchy in relation to other UIDocuments either attached to the same PanelSettings, or with the same UIDocument parent. |
| visualTreeAsset | The VisualTreeAsset loaded into the root visual element automatically. |
Inheritance
Operators
Operator | Description |
|---|---|
| operator == | Compares two object references to see if they refer to the same object. |
| bool | Determines whether the object exists. |
| operator != | Compares if two objects refer to a different object. |