Doddle USS takes an opinionated approach to developing maintainable UI with Unity's new UI system, UI Toolkit. It's a library of tools, and workflow for developing UI that takes lots of inspiration from popular CSS libraries such as Tailwind CSS, and Bootstrap, but is tailored for Unity.

Out of the box, UI Toolkit lacks a few key features (calc() methods in uss files, units besides px/%, box shadows, gradients, filters, keyframes etc.) for a complete UI system since it is still in development. I have no doubt this will be remedied in the future, however currently, it also lacks strong documentation to teach developers not just what things do, but how to develop UI.

To add to this, Unity has taken an interesting approach with Unity's new UI system, UI Toolkit as it will be much more familiar and comfortable for many developers outside of the Unity ecosystem, however the transition from UGUI to UI Toolkit for developers unfamiliar with web dev, will be a more difficult. Doddle USS documentation tries to help with this hurdle, but Doddle USS' primary goal is not to teach UI Toolkit. A few core concepts to understanding UI Toolkit are covered in the documentation, and all properties explain what they do with examples, but are not exhaustive.

To get started with UI Toolkit, the two most important core concepts to understanding how to build UI without frustration is understanding the Flexbox and Box Model.

  • Doddle USS takes an opinionated approach to developing UI in Unity that creates highly configurable UI with lots of control, but you don't have to develop that way. Do you just want to use the utility classes, or extension methods? Go for it.
  • Some of the missing features from CSS have been remade in Doddle USS such as box shadows and gradients. They are not perfect recreations, and not nearly as robust, but function, and allow you to create more appealing UI with depth.
  • If you do follow Doddle USS' recommended approach to developing UI, supporting themes, pushing out seasonal UI, or changing all UI in your project all at once is easy to experiment with, and much less of a hassle thanks to copious amounts of USS variable in theme files.
  • Doddle USS contains utility classes for every UI Toolkit property all in one style sheet allowing you to build your UI without an ever-growing list of custom classes, makes your UI more portable while staying performant.
  • Aside from the utility class library, Doddle USS also contains a small, but growing library of extension methods, and entry/exit/hover/loop transitions that can be used to build your UI, quicker, and easier.