02 — Project Setup and Settings
What to install: nothing
In Unity 6, UI Toolkit and the UI Builder ship with the editor. There is no package to add. (You only visit the Package Manager if you're on ancient Unity 2020 — and this course assumes Unity 6.)
Optional but recommended installs for class projects:
- Input System package (
com.unity.inputsystem) — Unity 6 projects usually have it active already. UI Toolkit runtime input works with both the old and new input systems; if prompted, "Both" is a safe Player setting for tutorials. Check Edit → Project Settings → Player → Active Input Handling. - TextMeshPro essentials are not needed — UI Toolkit has its own text engine.
The three setup pieces (do this once per project)
To show UI Toolkit content at runtime you need exactly three things:
1. A Panel Settings asset
Assets → Create → UI Toolkit → Panel Settings Asset.
This controls how your UI renders. The settings that matter on day one:
- Theme Style Sheet: assign the default runtime theme (next step). Without a theme, controls render unstyled.
- Scale Mode: set to Scale With Screen Size, reference resolution 1920×1080, match 0.5. This is the equivalent of uGUI's Canvas Scaler and is what makes your HUD look right on every monitor and phone.
- Sort Order: higher numbers draw on top — useful when you add a pause menu over a HUD later.
2. A runtime theme
Assets → Create → UI Toolkit → TSS Theme File, or just accept the UnityDefaultRuntimeTheme.tss Unity offers to create. Assign it to the Panel Settings' Theme Style Sheet slot. A theme file is one line — it imports Unity's default control styles:
@import url("unity-theme://default");
3. A UIDocument in the scene
GameObject → UI Toolkit → UI Document. On the component:
- Panel Settings → your Panel Settings asset
- Source Asset → the UXML file to display (e.g.
HUD.uxml)
That's the whole pipeline: UXML file → UIDocument → Panel Settings → screen.
Tools → UI Toolkit Starter Kit → Create Sample HUD In Current Scene performs all three steps for you (see Scripts/Editor/StarterKitSetup.cs — reading it is a nice bonus lesson in editor scripting).
Settings checklist
Next: 03 - UI Builder Basics