Creating UIs with UI Toolkit
In this section, we are going to learn how to create UI Documents, an asset that will define the elements our UI has. To do this, we are going to discuss the following concepts:
- Installing UI Toolkit
- Creating UI Documents
- Editing UI Documents
- Creating UI Stylesheets
Let's start by seeing how we can install UI Toolkit, as currently, it is not as straightforward as other packages.
Installing UI Toolkit
UI Toolkit can be used to create both Editor UI (custom editor windows) and In-Game UI. The tools to create Editor UI are already installed in Unity, but as we will use UI Toolkit to create In-Game UI, we need to install the Runtime Extension. This is essentially a package; however, the problem is that it will not appear in the Package Manager like other packages. Instead, we need to explicitly add it to the Package Manager via its URL. This is done this way due to the experimental nature of the package but, probably when...