文档

Unity Engine

Download Unity

Unity Engine

Structure UI

Structure your UI with either UXML or C#.
阅读时间1 分钟最后更新于 2 个月前

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