What is NimGui?
NimGui is short for Nimble Immediate Mode General User Interface and is a graphical user interface library for Unity's runtime. This library is built specifically with C# and Unity in mind and outputs vertex and index buffers which plug seamleslly into Unity's rendering pipeline.
Why create another ImGui framework for Unity?
Unity has a few UI solutions so far:
- ImGui system which is not suitable for runtime
- A GameObject based GUI system with a What You See Is What You Get (WYSIWYG) Editor
- A new web based UI solution UI Toolkit introducing XML like authoring with CSS styling
While each UI Solution has their own use cases, they often come with nuances and caveats which can hamper iteration times.
NimGui aims to provide a minimalistic library allowing you, the developers, to iterate and create tools to both visualize/debug/aid your workflow on runtime.
- Performance by default
- 1 draw call UI
- Utilizes Burst Compiler to help optimize the UI generation.
- Easy quick setup for URP and Builtin RP
- Use MonoBehaviour
LateUpdate()calls to draw UI
- Use DOTS SystemBase
OnUpdate()calls to draw UI in
- Reduce friction between develoment and debugging
- Use MonoBehaviour
- Portable - the library is designed to work with Windows, Mac, and WebGL(1*)
- Simple static API to draw UI in screen space
- Simple layout engine to ensure elements don't overlap
- Scopes to draw UI within regions
- Complex layout engine
- If you are looking for a layout engine that will work for any screen resolution, please use a retained mode GUI instead
- The most powerful/compreshensive UI library
- Building for WebGL works for desktop and mobile, however inputs will not nicely work on mobile WebGL. If you are running WebGL and is slow, please tune your memory allocation settings. Please see the faq for more details.
- Although this was built with using Unity's Burst Compiler in mind, it does not support drawing widgets from separate job threads yet