Table of Contents
UI Toolkit offers significant advantages over the traditional Unity UI (also known as uGUI) and legacy IMGUI (for Editor tools) systems. It provides a more modern, flexible, and performance-oriented alternative that scales better for most projects. It can also support your whole production pipeline, handling both Editor tooling and runtime games or applications.
Some of its benefits compared to the legacy UI systems include:
Faster iteration: Work and iterate more quickly with global style management and live authoring capabilities.
Rendering performance: Gain greater control over the performance of your game using Render Hints and dynamic texture atlases.
Better collaboration: Separate logic (C# code), UI structure (Unity XML, or UXML, documents), and styling (via a Unity Style Sheet or USS) to reduce conflicts and improve teamwork.
Reusability: Share and reuse styles and widgets within or across projects, as well as between the Editor and runtime.
UI Toolkit draws inspiration from web technologies, offering an advantage to developers familiar with web applications. For those new to markup languages like HTML/XML and Cascading Style Sheets (CSS), it’s a great opportunity to explore a powerful set of industry-standard tools.
UI Assets, the building blocks for creating UI, consist of UXML and USS files. UXML (Unity XML) represents the content and structure of your UI, and is similar to markup languages like HTML and XML.
USS, inspired by Cascading Style Sheets (CSS), is used to define the appearance and styles of your UI content. Both UXML and USS are used throughout this guide.
UI Assets can either be authored as code from your IDE of choice, or visually, with the UI Builder which is part of the UI toolkit. The UI Builder interface allows artists and designers to edit and visualize the UI as it’s being built.