API ReferenceGE Extensionseditor
Editor Headless Editor Test
Demonstrates the headless editor mode API - a mode that hides standard editor chrome (menus, toolbars) and lets a tool provide its own UI. Includes a test tool window and custom toolbar.
Demonstrates the headless editor mode API - a mode that hides standard editor chrome (menus, toolbars) and lets a tool provide its own UI. Includes a test tool window and custom toolbar.
Module Overview
| Aspect | Detail |
|---|---|
| File | extensions/editor/headlessEditorTest.lua |
| Returns | M table |
| Condition | Only registers hooks if not shipping_build |
| Windows | headless_editor_test, myCustomToolbar |
Public Functions
| Function | Signature | Description |
|---|---|---|
M.onEditorGui | () | Renders the test tool window and toolbar when headless tool is active |
M.onEditorInitialized | () | Registers windows and adds "Headless Editor Test" menu item under Debug |
M.onEditorActivated | () | Called when editor activates (no-op) |
M.onEditorHeadlessMainMenuBar | () | Draws custom menu bar in headless mode with "Exit Headless Mode" option |
M.onEditorHeadlessChange | (enabled, toolName) | Hook called when headless mode toggles (no-op placeholder) |
Headless Mode API Usage
-- Enter headless mode (hides default editor UI)
editor.enableHeadless(true, "myHeadlessTool")
-- Exit headless mode (restores default editor UI)
editor.enableHeadless(false, "myHeadlessTool")
-- Check if your tool is the active headless tool
if editor.isHeadlessToolActive("myHeadlessTool") then
-- Draw your custom UI
endWindow Registration
editor.registerWindow("headless_editor_test", imgui.ImVec2(200, 200))
editor.registerWindow("myCustomToolbar", imgui.ImVec2(500, 200))
editor.addWindowMenuItem("Headless Editor Test", onWindowMenuItem, {groupMenuName="Debug"})See Also
- Editor AI Tests - Related reference
- Editor AI Visualization - Related reference
- Editor – Assembly Spline Tool - Related reference
- World Editor Guide - Guide
Editor Ground Model Debug Helper
Registers a menu item in the editor's Debug menu group that opens the Ground Model Debug window (provided by `util_groundModelDebug`).
Editor Icon Overview
Browsable grid of all available editor icons. Allows filtering by name and copying icon keys to clipboard. Can also regenerate the icon atlas.