How to Use UI Builder and UI Toolkit in Unity ECS

This will take you about 20 minutes in prep time if you don't have Unity set-up, and 30 minutes in coding and debug time.

Click Here for DOTS Tutorial

Stop struggling with the limited documentation. Follow this step-by-step tutorial: "How to Use UI Builder and UI Toolkit in Unity ECS."

Full workflows and code to trigger a game scene and game UI with the ability to navigate back to Navigation Scene

Click Here for DOTS Tutorial

This gitbook takes you through step-by-step full workflows and code to trigger a game scene and game UI with the ability to navigate back to Navigation Scene. Once you've coded along and fully finished the "How To Use UI Builder and UI Toolkit" tutorial, you will be able to trigger a game scene and game UI with the ability to navigate back to Navigation Scene.

Click Here for DOTS Tutorial

High-Level steps to Use UI Builder and UI Toolkit:

Number 01

Create a Source Asset that will handle child Visual Elements

Number 02

Style a View and Create a ListView

Number 03

Use launch GameObjects to configure a host/client build scene

FAQ

What is UI Toolkit in Unity ECS?

Unity’s UI Toolkit is a collection of features, functionality, resources and tools for developing user interfaces (UI). You can use UI Toolkit to develop custom UI and extensions for the Unity Editor, runtime debugging tools, and runtime UI for games and applications. UI Toolkit is based on, and inspired by, standard web technologies. If you have experience developing web pages or applications, much of your knowledge might be transferable, and many of the core concepts might be familiar.

What is the difference between UI Toolkit and UI Builder in Unity ECS?

UI Builder is a new UI-creation tool by Unity. It allows you to easily create UI's that integrate with your Unity project. UI Toolkit (formerly UIElement) is a collection of features, functionality, resources and tools for developing user interfaces (UI). A good way to think about the relationship between the two is UI Toolkit is the elements needed to create UI and UI Builder is the tool you use to put them together.

What Asset types does UI Toolkit provide in Unity ECS?

The UI Toolkit provides the following Asset types that you can use to build user interfaces in a way that’s similar to how you develop web applications: UXML documents: Unity eXtensible Markup Language (UXML) is an HTML and XML inspired markup language that you use to define the structure of user interfaces and reusable UI templates. Although you can build interfaces directly in C# files, Unity recommends using UXML documents in most cases. Unity Style Sheets (USS): Style sheets allow you to apply visual styles and behaviors to user interfaces. They are similar to Cascading Style Sheets (CSS) used on the web, and support a subset of standard CSS properties. Although you can apply styles directly in C# files, Unity recommends using USS files in most cases.

Haven’t begun learning Unity DOTS yet, and need to start at the very beginning?

If you haven't yet dipped your toes into learning Unity's new multithreaded Data-Oriented Technology Stack (DOTS), now is the time. You can start at the very beginning with Moetsi’s tutorial, which culminates in your very own deployable sample project. You’ll be guided by full workflows, code-alongs, videos, and GIFs along the way.

Get Started