Parts of the UI Toolkit system
The UI Toolkit uses a set of assets and a GameObject component to create UI. The primary assets used to create UI are as follows:
- UI Document (UXML)
- Style Sheet (USS)
- Panel Settings
- Theme Style Sheet (TSS)
Figure 18.6: Assets used when making UI Toolkit interfaces
A UI Document is a UXML file type (.uxml
extension). This file uses Unity Extensible Markup Language (UXML) to define the layout and structure of the UI. While UXML is a unity-specific markup language, it works similarly to other markup languages like HTML and XML. You can create UXML files by right-clicking in an Asset folder and selecting Create | UI Toolkit | UI Document, then naming the file appropriately.
A Style Sheet is a USS file type (.uss
extension). This file is used to designate style properties that can be referenced in a UXML file. This works very similarly to a CSS file when working with HTML. You can create USS files by...