Introduction
RimGui is an easy-to-use, code-driven Immediate Mode GUI library built from scratch for rapid iteration, rather than extending existing UI Toolkit or uGUI.
I’ve often found existing GUI libraries frustrating to use:
- Building UIs usually involves tedious drag-and-drop operations
- Even simple UI can involve a lot of boilerplate code
- Adding, removing, and managing UI elements like buttons can be a hassle
- Registering and unregistering events like click handlers takes unnecessary effort
With RimGui, there's no need to build UIs with drag-and-drop or manually manage the lifecycle of UI elements.
You can render them with very concise code, like Gui.Button().
Works with all Unity versions 2021+ including 2021, 2022, 2023 & Unity 6.
Render Pipeline Support
- Supports Built-in Render Pipeline, URP, and HDRP.
Customizable
- Easily tweak various parameters to fit your needs.
- You can even render freely from the triangle mesh level for complete control.
Cross-platform Support
- Works not only on PC but also on WebGL and mobile platforms.
Font Support
- Supports custom fonts and texture atlas generation.
Optimized Immediate Mode GUI (ImGui)
- Designed with minimized GC (Garbage Collection) allocation.
- Draw calls are reduced by using a single Shader and Material, and by consolidating all images, including text, into one Texture.
Build UI Rapidly with Code Only
- To add a slider, just write a single line of code—no drag-and-drop required. To remove it, simply delete that single line.
Flexible Scalability:
- You can easily change the size and scale of UI widgets, making it simple to support multiple resolutions. This enables optimal UI display across various screen sizes.
It's not designed for GUIs that require flashy effects, but it's perfect if you need a simple and clean interface.
Example Code
Gui.Heading("ChangeAlpha");
using (ImageColors.Begin(new Color(1f, 1f, 1f, alpha)))
Gui.Image(Sprite);
Gui.Slider(ref alpha, 0f, 1f);
Gui.Text(alpha.ToString("F2"));
if (Gui.NextHeight(100f).BeginScroll())
{
for (int i = 0; i < 11; i++)
{
if (Gui.Button($"Set {i / 10f}"))
alpha = i / 10f;
}
Gui.EndScroll();
}
The following UI is displayed by the code above.
Goals
- Easy-to-use GUI library
- Rapid UI creation
- Simplicity
- High performance
- Usable not only for debugging and tools but also in actual games
- Minimal dependencies
Non-goals
- Support for GUIs with heavy visual effects
Features
- Box
- Button
- ToggleButton
- RadioButton
- CheckBox
- ColorPreview
- Custom
- Foldout
- Frame
- InputText
- Scroll
- Separator
- Slider
- Sprite
- Text
- Texture
- Window
- Heading
- Spacing
- InteractiveItem
- Drag and Drop
- And many more!
Rendering
- Line, Anti-Aliased Line,Closed Anti-Aliased Line
- Triangle
- Rectangle
- Circle
- Grid
- Anti-Aliased Convex Polygon
- BezierCurve
- Text
- Texture
- And many more!
Differences Between Unity IMGUI and RimGui
- High-Performance Design: RimGui is designed for high performance, including efforts to minimize GC (Garbage Collection) allocation. It also reduces draw calls by using a single Shader and Material, and by consolidating all images, including text, into one Texture.
- Modern Rendering Pipeline Compatibility: RimGui is compatible with the URP (Universal Render Pipeline) and HDRP (High Definition Render Pipeline), enables seamless integration with the latest Unity projects.
- Wide Platform Support: RimGui supports a diverse range of platforms, including PC, Mobile, and WebGL, allowing you to target your desired environments without limitations.
- Flexible Scalability: With RimGui, you can easily change the size and scale of UI elements, making it simple to support multiple resolutions. This enables optimal UI display across various screen sizes.
Links
AssetStore Page
Demo
Github
Introduction | RimGui
Unity Discussions
Support
If you have any bugs or feature requests, please submit them via this page.
For direct support, you can reach us at support [at] gridrand [dot] com.
You are also welcome to post questions or feedback on the Unity Discussions thread.