Table of Contents
UI Builder enables you to create, visualize, and modify UXML and USS files in a visual interface that’s integrated into the main Editor. Let’s look at the key features of UI Builder:
VisualElement class. You can style the look, define the behaviour, and display it on screen as part of the UI. More info💡 Tip: Saving UI assets
In UI Builder, save your changes from the Viewport menu (File > Save). This saves all open UXML and USS files.
Unlike Unity UI, the game can run in the Editor while you actively make changes in UI Toolkit. Look for the asterisk * next to the file name in the UI Builder’s Canvas header; this indicates unsaved changes.
Enabling the Canvas background can help you visualize your element styling over a color or background image. Select the UXML file in the Hierarchy pane and then choose a Canvas background that approximates the final UI interface to judge style changes in context.
The Canvas background provides a few different options:
Background Color: Represents a specific shade or hue of the game environment
Image: For choosing a spriteA 2D graphic objects. If you are used to working in 3D, Sprites are essentially just standard textures but there are special techniques for combining and managing sprite textures for efficiency and convenience during development. More info
See in Glossary or texture as the background (useful for replicating mockup screens or reference art)
CameraA component which creates an image of a particular viewpoint in your scene. The output is either drawn to the screen or captured as a texture. More info
See in Glossary: Displays the current gameplay in the background, enabling you to see the UI in context of the actual game
To navigate the work area, adjust the zoom level (between 25%–500%), or choose the Fit Canvas option which automatically adjusts the zoom according to the current screen real estate.
Use Preview to visualize the UI without accidentally editing the selected elements. When active, the Viewport can also show styles applied for specific mouse events (e.g., hovering, focusing).
💡 Tip: Match Game view and themes
To approximate a runtime UI, select the currently loaded UI Document (UXML) in the Hierarchy and check Match Game View. This sizes the Viewport to your project Reference Resolution. Remember that modifying this parameter does not affect the UI files themselves, only the visualization. From UI Builder you can also previsualize different themes used in your project, a feature that’s covered later in the guide.