Overview
Does not draw directly in update; preRender clears command buffers; buildCommandsForViewport walks active scene GameObjects with Canvas / UIImage / UIText / UIButton / UISlider / UISheet components, computing screen rects (layout utils), producing UITextCommand and UIImageCommand vectors consumed by FontPass and UIImagePass during renderScene.
World-space canvas modes transform with canvas world matrix; screen-space overlays use orthographic projection in passes.
How it works
preRenderclears UI command buffers.buildCommandsForViewporttraverses scene UI components and builds draw commands.ModuleRender::renderSceneconsumes commands inFontPassandUIImagePass.
Internal architecture
ModuleUI
├── Scene graph UI traversal
├── UITextCommand / UIImageCommand buffers
└── Integration with FontPass / UIImagePass
Relationships
ModuleEventSystemhandles interaction;ModuleFontsupplies glyphs;ModuleRendertriggers build before GPU UI draws.
Technical features
- Command-buffer UI architecture (text + image commands).
- Supports world-space and screen-space canvas modes.
- Layout utilities produce screen rects for UI components.
Implementation notes
- Verified: command-buffer UI architecture tied to render passes.

