- The folder structure must be preserved for OpenGUI to work with C#, because of the Unity compiler order. Also the .cs files must be in a subdirectory. e.g. /Assets/Scripts.
- Unity suffers from some serialisation bugs, so if changes to your OGSkin don't stick between restarts, try dragging it into the scene and applying it. It's a temporary fix until it's resolved.
- MonoDevelop doesn't always see the OpenGUI classes, as it tends to favour C#. This is a bug on their part, not much we can do.
- Any help, including feature requests and error reports, is much appreciated.
- I happily add contributors on GitHub, so don't be shy.
- Shoutouts to Acrobot for his code contributions and Muber Gaming, frankyboy450, MuNgLo, Lokkij for their very helpful feedback.
This is coded in my spare time, together with my own game project, and is therefore not a super polished product yet. The new OpenGUI is still in beta, but it's been under development for a few months, and it's not far from its official release.
As pointed out to me by Lokkij, distribution via .zip files does not guarantee correct linkage between assets. OpenGUI will henceforth be distributed as a .unitypackage.
What is OpenGUI?
It's a GUI framework for Unity that aims to keep things as simple as possible while keeping draw calls to an absolute minimum. I am developing this in tandem with my Deus Ex-based game project The Vongott Chronicles
I find the UI frameworks in the Asset Store mostly bloated and/or expensive. This is a fat-free open source alternative, for those of you who might be interested in that. I'll list some differences from other frameworks I've used:
- You only need 1 component per widget. Mouseover detection and the like are taken care of by the root node.
- Making custom widgets is more of a coding job (although not a very complicated one), but at least you don't have to struggle with a bunch of components working against each other.
- There is only one Z-buffer, no "depth" parameter to contradict the transform position of widgets.
- It's a pixel matrix OpenGL-based tool, so there are no 3D widgets, although you can display 3D objects on it, at the cost of a draw call each.
- The custom inspectors are designed with the utmost simplicity in mind, rather than trying to do backflips where none are needed.
- There is no automatic atlas generator. I prefer it that way, but if it's a requested feature, I could look into it.
- It uses native fonts, which means kerning is based on Unitys implementation, but you don't have to use external bitmap font generators.
- It's in some cases less optimised than others, as the project is still quite young, although even a full screen of widgets should still be able to display at 60fps in most cases.
- It's a community project, so nobody is going to charge you anything. It simply exists because there was a need for it.
How to use it?
You can use the editor menu to add widgets or just create empty game objects and add components manually.
The draw order, scale and position of the widgets are inherited from the game object's transform component.