Hi folks,
I am developing UNIStyle, a style sheet driven system for UI design.
You describe your UI style in a CSS-like language. In addition to normal css syntax you can use math functions and placeholder variables. These can be set from the inspector which allows for super fast prototyping, even while running the game in the editor. Tweens are also easy to include, custom tween curves are possible, too.
This is not a UI replacement!
UNIStyle sits on top of Unity’s “new” GUI system and controls its design aspect. However, the system is not bound to uGUI in particular and can be adapted to any UI system with a bit of effort.
The whole system is easily extendable, new properties and support for new types and MonoBehaviours can be added with a few lines of code, and be packaged in a shareable theme extension module.
This is the current roadmap:
-
Allow Custom properties ✓
-
Allow Custom types ✓
-
Allow Custom functions ✓
-
Allow Custom theme extension packages ✓
-
Allow Custom variable storage in theme extensions
-
Direct setting of properties (inline styles)
-
Support media queries
-
Loading of external style sheets (non-assets)
-
Adding multiple style sheets to one theme
-
Support all uGUI classes in default extension
-
Parser and selector engine optimization
I would love to read your feedback and any suggestions you might have!
P.S.
For demo purposes I made a simple minesweeper-like game in 160 lines of C# and 100 lines of CSS. Everything graphical, including fonts, coloring and tweens is handled by UNIStyle. The game code is only concerned with the game logic and switching a few css classes on the elements.
The theme is editable via the editor with instant feedback. This makes tweaking very simple.
The demo game:
The editor:
Higher resolution video: Imgur: The magic of the Internet