UGUIDots is a Data Oriented Tech Stack library aimed to bridge the gap in between Unity’s WYSIWYG UI and the Entity Component System. This is a low level library which augments on top of Unity’s UI and does not serve as a replacement - so the workflow of authoring UI designs in games largely remains the same.
Why do this?
A DOTS compliant UI is still underway (which will be based off of UIElements). Until then, I need a UI solution the works with the Scriptable Render Pipeline - without building too many custom tooling. Similarly - one that has the performance capabilities and low overhead for both mobile and desktops. That said supported platforms are primarily for:
- iOS (? - currently hard for me to test)
- Linux 64 bit
- Windows 64 bit
The wiki is currently being worked on and contains basic information about Image/Text pipelines.
General purpose change log can be found here.
If you would like to help contribute to the development of UGUIDots, please see the contribution guidelines here.
Support for the following will come over time - depends on the needs for my own game.
(?) - Maybe I’ll support?
There is currently a known issue with OpenUPM, where Unity internal scopes are added to the registry. After adding the
package via OpenUPM, head over to the manifest file and delete the
com.unity.* under the
cd <path-to-project> openupm add com.initialprefabs.uguidots
git submodule add https://github.com/InitialPrefabs/UGUIDots.git <path-to-folder>
Download the latest release and add it to your project directly.
Below are the basic steps to get the package working in game.
Setting up the Render Command
- Set up project to use the Universal Render Pipeline
- Add the RenderCommandAuthoring component with a scriptable render feature to a GameObject.
- Add the
ConvertToEntitycomponent to the
Converting GameObjects to Entities
- Design your UI normally using the WYSWYG editor in Unity
- Add the BatchedMeshAuthoring component to your root canvas
- Build the batch on the BatchedMeshAuthoring component
- Add the
ConvertToEntitycomponent to convert the GameObject hierarchy to its Entities’ format
Setting up input
- Add the
MobileMouseInputAuthoringcomponent to a GameObject for Mobile support
- Add the
StandaloneInputAuthoringcomponent to a GameObject for Windows/macOS/*nix support
- Put the GameObject into a subscene or add the
ConvertToEntitycomponent to it
Please see the Sample repository here.
- Unity 2020.1bx
Grab these from Unity’s package manager.
- Burst 1.3.0
- Entities 0.11.0-preview.7
- Jobs 0.2.10-preview.11
- Collections 0.9.0-preview.5
- UGUI 1.0.0
- Universal RP 9.0.0-preview.14
- TextMeshPro 0.3.0-preview.11
Development is still underway - so not all of the features Unity has by default is supported. Similarly - there are certain cases that are not accounted for, like sub canvases as I barely use features like that.
Some thanks to a few folks who’ve helped me figure out things along the way
- Sabrina Lam (Logo artwork)
- Valentina S.
- Arthur D.
- Mason R.