Documentation

Unity Engine

Unity Engine

Structure UI

Structure your UI with either UXML or C#.
Read time 1 minuteLast updated a month ago

You can structure UI with either UXML or C#.

Topic

Description

The visual treeStructure elements in your UI into a visual tree.
Structure UI with UXMLWrite UXML files, add styles to UXML, and reuse UXML templates.
Structure UI with C# scriptsAdd and interact with UI controls in C#.
Custom controlsUnderstand the steps to create and use custom controls.
Best practices for managing elementsThings you can do to improve performance when you manage elements in a UI.
Encapsulate UXML documents with logicCreate reusable UI components that encapsulate a specific hierarchy of elements.
UXML elements ReferenceFind a complete list of all the UXML elements.
Structure UI examplesFind a list of structure UI examples.

Additional resources