Prowl ships a fully custom immediate-mode GUI system — not Dear ImGui, not Unity’s UGUI, but a purpose-built renderer that powers both the editor itself and runtime in-game HUDs. Every frame you describe what you want drawn by calling methods on theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/ProwlEngine/Prowl/llms.txt
Use this file to discover all available pages before exploring further.
Gui class; the system handles layout, clipping, z-ordering, interactability, and animated transitions automatically. Because the same Gui instance drives the editor windows, your game HUD, and the property inspectors, any widget you build for a runtime overlay can be re-used inside an EditorWindow without changes.
Entry Points
The Gui Class
Gui is a partial class spread across several files that together provide:
- Layout — a flexbox-inspired tree of
LayoutNodeobjects - Drawing —
Draw2D(rectangles, text, images) andDraw3D(gizmos, world-space lines) - Input — pointer position, button states, keyboard keys, double-click, and drag-and-drop
- Interaction — hover, active, and focus tracking per node
- Animation —
AnimateBoolhelpers for smooth transitions - State storage — per-node and global key-value storage that persists across frames
Gui for the current scope is always available as Gui.ActiveGUI.
GuiLayer Component (Runtime)
Add aGuiLayer component to a Camera GameObject to render a runtime GUI on top of that camera’s output. Each frame the engine calls OnGUI(gui) on every enabled MonoBehaviour in the scene, passing the active Gui instance. Override OnGUI in any of your components to draw UI.
GuiLayer requires a Camera component on the same GameObject. The PlayerHUD (or any other component with OnGUI) can live on any GameObject in the scene.
Editor Tools
For editor panels, overrideOnInspectorGUI in a ScriptedEditor or implement an EditorWindow. The gui field is already set up for you:
Layout System
Every GUI element lives inside aLayoutNode. Nodes form a tree; each node can flow its children horizontally (LayoutType.Row) or vertically (LayoutType.Column), similar to CSS flexbox. You open a node with gui.Node(id), chain builder methods to set dimensions, then call .Enter() in a using block to make it current.
Key LayoutNode Builder Methods
| Method | Purpose |
|---|---|
.Width(Size) / .Height(Size) | Fixed pixel size |
.ExpandWidth() / .ExpandHeight() | 100% of parent |
.Left(Offset) / .Top(Offset) | Absolute or relative position |
.Layout(LayoutType) | Row, Column, or None |
.Spacing(Size) | Gap between children |
.Padding(double) | Inner padding on all sides |
.Clip() | Enable scissor clipping for this node |
.Scroll() | Add a scrollable region |
.FitContent() | Shrink-wrap to children |
.IgnoreLayout() | Remove from the automatic flow |
Size and Offset accept plain pixel values or percentage helpers:
Basic Widgets
Text
Buttons
Check interaction usinggui.IsNodePressed() after entering the node:
Input Fields
InputFieldFlags controls behaviour:
Combo / Dropdown
Drawing
GuiDraw2D
Access viagui.Draw2D. All coordinates are in the GUI’s local pixel space (top-left origin).
GuiDraw3D
gui.Draw3D lets you draw world-space geometry that is composited on top of the 3D scene — useful for custom gizmos and debug overlays in editor tools.
UIDrawList
GuiDraw2D routes all calls through a per-Z-index UIDrawList, which batches vertices for efficient rendering. You can access it directly for custom low-level rendering:
Input Handling
Prowl’s GUI input system tracks pointer position, button state, and keyboard keys per frame. All queries go through theGui instance rather than Input to respect GUI focus and z-ordering.
Interactables
For precise hover and click tracking attached to a specific node, useGetInteractable():
Interactable members:
| Member | Description |
|---|---|
IsHovered() | Pointer is over this node and not blocked |
IsActive() | Left button held on this node |
IsFocused() | This node took focus via TakeFocus() |
TakeFocus() | Returns true on the click/release frame |
Drag and Drop
GUI Animation
gui.AnimateBool smoothly interpolates a float between 0 and 1 based on a bool state, persisting the animated value across frames using an auto-generated ID.
EaseType values include Linear, SineIn/Out, QuadIn/Out, CubicIn/Out, ElasticOut, BounceOut, and more — covering all standard CSS timing functions.
Z-Ordering
Usegui.SetZIndex(int) to draw a node on top of everything else — essential for popups and tooltips:
State Storage
Store per-node values that survive across frames without declaring member fields. State values must be unmanaged types (bool, int, float, structs with no references):
Editor Gizmos
The editor uses the sameGuiDraw3D pipeline to render transform handles. TransformGizmo and ViewManipulatorGizmo are available in Prowl.Runtime.GUI.Widgets.Gizmo and are powered by the same Gui machinery — you can use them as reference when building custom scene handles.
The GUI system does not use Dear ImGui. It is a standalone implementation that shares design inspiration but has its own layout engine, draw list, and input model. Do not mix
ImGui.* calls into Prowl GUI code.