Overview of UI Toolkit
UI Toolkit is the newly introduced user interface in the latest Unity Engine. It is designed to enhance performance and ensure long-term improvements. It can also accommodate advanced use cases involving HTML and CSS. The Unity UI caters to game user interfaces with moderate complexity. It minimises the need for extensive updates across user interfaces, game projects, or game versions. The UI Toolkit enhances the experience over time. This happens as you update the game project version in Unity. It offers significant advantages over its predecessor in usability.
The paragraph brings improvements and version compatibility. The UI Toolkit integrates directly with the Unity Game Engine. It is part of the engine version itself, and the package manager does not manage it. This integration guarantees that it will update alongside the latest available Unity versions.
Support New Programming Tools
The UI Toolkit supports HTML. It is an excellent choice for web developers looking to integrate this language. This toolkit is readily available for use. Additionally, CSS is utilised in the editor for naming and renaming user interface objects. These UI objects can be referenced within C# scripting. This occurs during programming on the job system. It can also occur on the Mono Behaviour main thread. Register the object names during initialisation. This allows you to access them in C# scripting. You can call functions to change string text for labels displayed on screen. HTML can also facilitate input for various objects like buttons, inputs, text fields, and toggles in scripts. For manual actions, you can drag objects within the UI Toolkit editor to the desired transform flex. Web developers will find the scripting aspect more familiar.
Auto Update
At the moment, I’m working with the UI Toolkit. The tools are still in early access. This means Unity developers will need to update their game projects following any new updates to the Unity game engine. The UI Toolkit is relatively new. It requires further enhancements. Yet, it holds promise for the future of the Unity game engine, especially beyond just the Unity user interface.
UI Toolkit Issues
There are several issues with the UI Toolkit. These issues affect how it interacts with the Unity user interface. This is particularly evident in the simulation or farming game. The dialogue for the fluffy character necessitates game object instantiation in the world. Updating its world position is also required accordingly. This challenge has made me realise something important. Utilising the Unity user interface alongside the UI Toolkit is crucial for effectively addressing these issues. I’m still uncertain about the role of the UI Toolkit, such as updating label text. I do not know how it should reflect changes in world position during development.
Additionally, the UI Toolkit cannot be destroyed post-instantiation unless the Unity user interface is employed. Let us look at the screenshots. They demonstrate the User Interface from both the previous and the new casual fluffy farm game. I have developed these interfaces.
Comparison of UI Toolkit and Unity User Interface
Game Panel Settings


Screenshot 1 displays the canvas scaler for the user interface in the main menu, allowing for screen resizing to different dimensions. At the top is the Unity user interface, while the bottom showcases the User Interface Toolkit. Many functions are quite comparable between the two, particularly concerning reference resolution and scale mode. To integrate the User Interface Toolkit, you must include the UI Document scripts and configure the panel settings, whereas for the Unity user interface, you need to add the canvas scaler along with the canvas.
Start Game Button


Screenshot 2 displays the user interface buttons for both the UI Toolkit at the bottom and the Unity user interface at the top. To modify the transform of the Unity user interface, adjust the Rect Transform by changing the position, rotation, and scale within the hierarchy. Configure the button interface either manually or through scripts to trigger an event when pressed. Add an image to the button by selecting a specific sprite. The bottom image illustrates the UI Toolkit, which features attributes that allow you to manipulate text on the button. The stylesheet uses CSS syntax, where you specify the name of the hierarchy button object to reference in C# scripting, such as enabling or disabling the object.
The position setting allows for transforming the location on the screen, while size adjusts the scaling of the user interface, and background enables the insertion of an image for the button. The UI Toolkit functions similarly, particularly the button, when compared to the Unity user interface.
Input Interface


Screenshot 3 showcases an input field that operates similarly to the one in Screenshot 2 for transform and image functions. The Unity user interface‘s input field features settings and events for changed values. The UI Toolkit input field serves as a text field where any string can be entered for use with C# scripting.
Volume Slider


Screenshot 4 showcases the slider for the Unity User Interface and UI Toolkit. To implement the Unity User Interface, you’ll need to attach the Slider component to the game object. The slider’s transformation functions similarly to that in screenshot 2. It can trigger an event whenever its value changes, such as modifying the sound variable based on the current value. Likewise, in the UI Toolkit, the slider can register an event in C# scripting to perform actions related to the audio system according to the updated slider value.
Music Toggle


Screenshot 5 showcases the Unity user interface and UI Toolkit, which share a transformation similarity previously detailed in Screenshot 2. Notably, the toggle acts as a unique component of the Unity user interface, allowing users to add it to a game object by locating the toggle component through search. The toggle functions like other event functions, performing actions after users register an event. This behaviour also mirrors the UI Toolkit, where users can activate or deactivate a toggle by adjusting its boolean value in the inspector, as displayed in screenshot 5.
Subscribe to get access
Read more of this content when you subscribe today.
Conclusion: Using UI Toolkit
The use of the UI Toolkit, especially in developing the casual fluffy farm, has been a good experience. I managed to add certain interfaces, as I mentioned above, to the game. However, there are some aspects of the user interface that I could not manage to implement, as the UI Toolkit does not fully support the Unity user interface. Hopefully, they will provide better support in the future. For this casual fluffy farm, having both user interfaces makes the project feel mixed; however, the combination of both actually helps in updating more user interfaces in the future. I believe there will be more improvements in the UI Toolkit soon.
I drafted this article from my own perspective and used AI to polish the language.
Concept art (created with generative AI, touched up manually).

Leave a Reply