Version: 2020.2
Creating user interfaces (UI)
UI Toolkit

Comparison of UI systems in Unity

Unity intends for UI Toolkit to become the recommended UI system for new UI development projects, but it is still missing some features found in Unity UI (uGUI) and IMGUI. These older systems are more appropriate for certain use cases, and are required to support legacy projects.

This page provides a high-level feature comparison of UI Toolkit, Unity UI, and IMGUI, and notes about their respective approaches to UI design. Use it to help determine which UI system is appropriate for your project.

IMPORTANT
UI Toolkit is in active development. This page will update frequently as the feature set evolves.

General considerations

Type of UI: Editor or runtime

Your choice of UI system depends on whether you’re developing UI for the Unity Editor or runtime UI for a game or application.

Type of UI UI Toolkit Unity UI(uGUI) IMGUI Notes
Runtime (debug) ✔ * This refers to temporary runtime UI used for debug purposes.
Runtime (in-game) ✔ * Not Recommended For performance reasons, Unity does not recommend IMGUI for in-game runtime UI.
Unity Editor You cannot use Unity UI to make UI for the Unity Editor.

* Requires the UI Toolkit package, currently in preview.

To create runtime UI, your choice is between UI Toolkit and Unity UI (uGUI). See Feature comparison: UI Toolkit vs. Unity UI (uGUI).

To create UI for the Unity Editor, your choice is between UI Toolkit and IMGUI. See Feature comparison: UI Toolkit vs. IMGUI.

Roles and skill sets

Your team’s skill set and comfort level with different technologies is also an important consideration.

Type of user UI Toolkit Unity UI
(uGUI)
IMGUI Notes
Programmer Programmers can use any game development tool or API.
Technical Artist Partial Technical artists who are familiar with Unity’s GameObject-based tools and workflows are likely to be comfortable working with GameObjects, Components, and the Scene view.

They might not be comfortable with UI Toolkit’s web-like approach or IMGUI’s pure C# approach.
UI Designer Partial UI designers who are familiar with UI creation tools are likely to be comfortable with UI Toolkit’s document-based approach.

If they are not familiar with GameObject-based workflows, they might require help from programmers and/or level designers.

Innovation and development

UI Toolkit is in active development. Unity adds new features with each release. Unity UI and IMGUI are established UI systems that are production-proven, but updated infrequently.

Unity UI and IMGUI might be better choices if you need features that are not yet available in UI Toolkit, or you plan on supporting or reusing older UI content.

Feature comparison: UI Toolkit vs. Unity UI (uGUI)

This section compares UI Toolkit to Unity UI (along with the TextMesh Pro package) for developing runtime UI for games and applications.

Unity Editor UI Development

It is not possible to develop user interfaces for the Unity Editor using Unity UI.

Workflow

Feature UI Toolkit UGUI+TMP Notes
Nested Prefabs Partial UI Toolkit’s UXML templates support attribute overrides, which are similar to modified properties in the Unity Prefab system.

UGUI is GameObject based, and supports standard Unity Prefabs.
WYSIWYG authoring Unity UI and UI Toolkit offer very different WYSIWYG authoring experiences.

Because Unity UI is GameObject-based, you can set up the Scene view for WYSIWYG authoring.

UI Toolkit provides the UI Builder package (currently in preview) for document-based WYSIWYG UI authoring with a web-like workflow.
Theming Planned UI Toolkit roadmap includes support for theming functionality via the UI Builder and USS imports.
Layout & Styling Debugger You can debug Unity UI interfaces in the Inspector window.

UI Toolkit provides a dedicated debugger (menu: Window > UI Toolkit > Debugger) that is similar to debug tools found in major web browsers.
Scene integration Unity UI GameObjects are visible in the Scene view and the Game view.

You can integrate runtime UI created with the UI Toolkit package (currently in preview) via runtime components, and display it in the Game view.

Styling

Feature UI Toolkit UGUI+TMP Notes
Inline styles
Cascading styles
Pseudo-states (for example, hover or active) Unity UI provides simple pseudo states, and you can create complex pseudo states for it using Unity’s Animation graph.

UI Toolkit supports pseudo-states via USS.
Rich text tags Planned Rich text tag support in UI Toolkit is planned as part of an update to Unity’s text rendering backend.

Unity UI supports a basic set of rich text tags by default, and a larger set via the TextMesh Pro package.
SDF text Planned SDF text support in UI Toolkit is planned as part of an overhaul of Unity’s text rendering backend.

Unity UI supports SDF text via the TextMesh Pro package.
Font fallbacks Planned Support for font Assets and fallback fonts in UI Toolkit is planned as part of an overhaul of Unity’s text rendering backend.

Unity UI supports fallback fonts via the TextMesh Pro package.

Layout

While Unity UI and UI Toolkit offer the same layout possibilities, their layout systems are quite different.

  • With Unity UI, you control layout at the GameObject level, using RectTransForm components.
  • With UI Toolkit, you define layout in USS stylesheets, using a more web-like Flexbox-based layout system.
Feature UI Toolkit UGUI+TMP Notes
Manual layout (absolute or relative to parent)
One-dimensional (horizontal and vertical)
Two-dimensional (grid) Research Unity UI provides the GridLayoutGroup component.

For UI Toolkit, Unity is investigating the possibility of implementing CSS-style grids in USS.

Events

Feature UI Toolkit UGUI+TMP Notes
Integration with Unity’s new Input System Planned
Serialized events Planned UI Toolkit can only bind events to elements in C#.

Unity UI can serialize event bindings.
Visual Scripting for events Research

Rendering

Choosing between UI Toolkit and Unity UI is a tradeoff between high performance and versatility/supported features.

UI Toolkit currently supports a smaller set of capabilities, but is easier to optimize for rendering performance. It is document-based, data driven, and uses a single shader, material, and texture atlas to draw element hierarchies. It is a good choice for simple, screen space UI (for example, menus or heads-up displays) that includes complex hierarchies of elements, and performs well on any platform.

Unity UI is more versatile, and supports advanced rendering and text features. You can set up any visual element with a custom material, and take advantage of advanced clipping and masking features. However, these features might make it difficult to keep more complex UI within your performance budgets.

Feature UI Toolkit UGUI+TMP Notes
Supported for Built-in Render Pipeline
Supported for Universal Render Pipeline (URP)
Supported for High Definition Render Pipeline (HDRP)
Screen-space (2D) rendering
World-space (3D) rendering Planned
Custom materials and shaders Planned
Shader Graph integration Planned
SVG integration Planned Planned The com.unity.vectorgraphics package provides SVG support for Unity UI. However the package is currently in preview, and is not recommended for production.
Anti-aliasing Planned Partial Unity UI’s Screen Space-Camera, and World Space rendering modes use Cameras, which apply antialiasing.
2D rotation (object remains on the UI plane)
3D rotation Planned
Rectangle clipping Partial UI toolkit supports rectangle clipping without rotation. The rectangle must be axis-aligned.
Mask clipping Partial UI toolkit supports mask clipping with 2D rotation.

Unity UI supports 3D mask rotation.
Nested masking Partial/Planned UI toolkit’s nested masking is limited to one level, but does not affect draw-call batching. Multi-level nested masking is planned.

Unity UI supports up to eight levels of nested masking, but breaks draw call batching every second level.

Animation

Feature UI Toolkit UGUI+TMP Notes
Tweening workflow Experimental Partial
Integration with Animation Clips and Timeline Planned

Customizability

Feature UI Toolkit UGUI+TMP Notas
Open Source / Customizable Planned The UI Toolkit package (currently in preview) is customizable.

Feature comparison: UI Toolkit vs. IMGUI

This section compares UI Toolkit to IMGUI for developing user interfaces for the Unity Editor.

Inspector integration

Feature UI Toolkit IMGUI Notes
Default Inspectors Planned UI Toolkit will become the default UI backend for Inspector windows (for when a type does not have custom editors).
Inspector: Edit custom object types
Inspector: Edit custom property types
Inspector: Mixed values (multi-editing) support Planned
Array / list-view control Planned

Controls and data binding

Feature UI Toolkit IMGUI Notes
Tree View Planned
Grid View Planned
Graph View Planned
Data binding: Serialized properties
Data binding from any C# type Planned
Data binding to any attribute or style value Planned

Workflow

Feature UI Toolkit IMGUI Notes
Nested Prefabs Partial UI Toolkit’s UXML templates support attribute overrides, which are similar to modified properties in the Unity Prefab system.
WYSIWYG authoring UI Toolkit provides the UI Builder package (currently in preview) for document-based WYSIWYG UI authoring with a web-like workflow.
Theming Planned
Layout & Styling Debugger IMGUI has a limited debugging tool for layouts and styles.

UI Toolkit provides a dedicated debugger (menu: Window > UI Toolkit > Debugger) that is similar to debug tools found in major web browsers.
Scene View integration

Styling

Feature UI Toolkit IMGUI Notes
Inline styles
Cascading styles
Pseudo-states (for example, hover or active) Partial
Rich text tags Planned Rich text tag support in UI Toolkit is planned as part of an update to Unity’s text rendering backend.
SDF text Planned SDF text support in UI Toolkit is planned as part of an update to Unity’s text rendering backend.
Font fallbacks Planned

Layout

While Unity UI and IMGUI offer the same layout possibilities, their layout systems are quite different.

  • IMGUI uses the C#-based GUILayout system.
  • UI Toolkit uses a more web-like Flexbox-based layout system. You control layout via USS styles.
Feature UI Toolkit IMGUI Notes
Manual layout (absolute or relative to parent)
One-dimensional (horizontal and vertical)
Two-dimensional (grid) In research For UI Toolkit, Unity is investigating the possibility of implementing CSS-style grids in USS.

Events

Feature UI Toolkit IMGUI Notes
Integration with Unity’s new Input System Planned
Serialized events Planned
Visual Scripting for events Research

Rendering

Feature UI Toolkit IMGUI Notes
Supported for Built-in Render Pipeline
Supported for Universal Render Pipeline (URP)
Supported for High Definition Render Pipeline (HDRP)
Screen-space (2D) rendering
World-space (3D) rendering Planned While it is technically possible to create 3D UI in IMGUI using GUI.matrix, it is not recommended.
Custom materials and shaders Planned
Shader Graph integration Planned
SVG integration Planned
Anti-aliasing Planned

Animation

Feature UI Toolkit IMGUI Notes
Tweening workflow Experimental
Integration with Animation Clips and Timeline Planned

Customizability

Feature UI Toolkit IMGUI Notes
Open Source / Customizable Planned The UI Toolkit package (currently in preview) is customizable.

Creating user interfaces (UI)
UI Toolkit