Visual Elements and UI Hierarchy
In the same way that a uGUI-built UI is comprised of multiple GameObjects, a UI Toolkit-built UI is comprised of Visual Elements. There are multiple UI elements available to you in the UI Toolkit system (buttons, labels, sliders, etc.), but the Visual Element is the base class for all of them, so they all derive many of their properties from it.
Just as GameObjects are organized in the Unity Editor Hierarchy, UI Toolkit organizes its Visual Elements in something called a UI Hierarchy. For example, let’s say I’d like to create a UI similar to the one displayed in Figure 18.10.
Figure 18.10: Simple sample UI
The Scene Hierarchy in the Editor, if it were built with uGUI, is quite similar to the UI Hierarchy, if it were created with UI Builder, as shown in Figure 18.11.
Figure 18.11: Scene Hierarchy for uGUI versus UI Hierarchy for UI Toolkit
Except for some slight changes in naming...