Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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

[HelpURL("UIE-get-started-with-runtime-ui")][AddComponentMenu("UI Toolkit/UI Document")][DefaultExecutionOrder(-100)]public sealed class UIDocument : MonoBehaviour

Properties

Property

Description

panelSettingsSpecifies the PanelSettings instance to connect this UIDocument component to.
parentUIIf 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.
rootVisualElementThe root visual element where the UI hierarchy starts.
runtimePanelThe runtime panel that this UIDocument is attached to.
sortingOrderThe 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.
visualTreeAssetThe VisualTreeAsset loaded into the root visual element automatically.

Inheritance

Inherited Members

Operators

Operator

Description

operator ==Compares two object references to see if they refer to the same object.
boolDetermines whether the object exists.
operator !=Compares if two objects refer to a different object.