What are the advantages from UI Toolkit over Unity UI ?

What are the main advantages and main disadvantages ?

And the most important question, is the UI Toolkit good for creating flexible and dynamic UI-Objects, changing their structure, shape even during runtime ? ( Inventory where each item entry could look different )

This might help: Unity - Manual: Comparison of UI systems in Unity

After using UITK for a bit both in editor and at runtime.

Advantages:

  • Performance: superior to IMGUI and better than UGUI.
  • Auto layout: similar to IMGUI and superior to UGUI’s expensive to use layout components.
  • Styles: allows you to create style classes through uss that can be applied to any element.
  • Decoupled from the MonoBehaviour/GameObject system reducing overhead and giving greater programing flexibility.
  • Flexible design options: write your own uxml/uss, use UIBuilder or code it directly.
  • No more UI cluttering up your scene hierarchy.
  • Unified UI between editor and runtime.

Disadvantages:

  • Being in preview for runtime and all the fun that comes with that.
  • Layouts not on par with css layouts. No grid layout option.
  • Missing themes, they are planned.
  • For those used to the GameObject system may find it cumbersome to use.
  • Some rendering issues that are currently being worked on.
  • Lack of tutorials other than some code examples.
  • Runtime is not on par with UGUI, still missing a few things.
  • Outdated documentation, some stuff has changed or been added and the docs don’t reflect that.
  • Runtime drag and drop doesn’t work the same as in the editor(events don’t fire) and requires a custom system to work making it complicated to use. The documentation on drag and drop only works in the editor, but does not state that.
  • Event system is not consistent. Some elements have dedicated event handlers while others use a function to subscribe to the event.
  • No world space rendering. It is planned and there is a work around but it may not perform well compared to a built in system.

It will be able to do what you want it to do, the system is designed around being auto layout so it will dynamically position components based on child order and size. Not sure if it will position it based on shape other than a rectangle though.

6 Likes