Editor Layout Manager
Manages saving, loading, and deleting of editor window layout presets. Handles both named layout snapshots and the current working layout. Wraps ImGui INI persistence and editor window state JSON file
Manages saving, loading, and deleting of editor window layout presets. Handles both named layout snapshots and the current working layout. Wraps ImGui INI persistence and editor window state JSON files.
Module Overview
| Aspect | Detail |
|---|---|
| File | extensions/editor/layoutManager.lua |
| Returns | M table |
| Requires | ui/imguiUtils |
| Default layout | settings/editor/layouts/Default |
Public Functions
| Function | Signature | Description |
|---|---|---|
M.getWindowLayouts | (toolName) → table | Lists all saved layout directories for the tool (default: "editor") |
M.loadWindowLayout | (layout, toolName) | Loads a named layout - restores window state JSON and ImGui INI |
M.saveWindowLayout | (layoutName, toolName) | Saves current layout to a named preset directory |
M.loadCurrentWindowLayout | (toolName) | Loads the working (unsaved) layout state |
M.saveCurrentWindowLayout | (toolName) | Saves the current layout as the working state |
M.deleteWindowLayout | (layoutPath) | Deletes a named layout directory and all its files |
M.resetLayouts | (toolName) | Deletes all layouts except Default, then loads the Default layout |
File Structure
settings/editor/
├── windowsState.json -- Current working layout
├── layouts/
│ ├── Default/
│ │ └── windowsState.json
│ ├── MyLayout/
│ │ └── windowsState.json
│ └── ...
settings/
├── imgui.ini -- Current ImGui window positions
└── default_imgui.ini -- Default ImGui positions (used with Default layout)Usage Example
local layoutMgr = extensions.editor_layoutManager
-- List available layouts
local layouts = layoutMgr.getWindowLayouts()
-- Save current layout as preset
layoutMgr.saveWindowLayout("MyCustomLayout")
-- Load a preset
layoutMgr.loadWindowLayout("settings/editor/layouts/MyCustomLayout")
-- Reset everything to defaults
layoutMgr.resetLayouts()See Also
- Editor AI Tests - Related reference
- Editor AI Visualization - Related reference
- Editor – Assembly Spline Tool - Related reference
- World Editor Guide - Guide
Editor Inspector
Object property inspector for the world editor. Displays and edits fields of selected scene objects, supports multiple simultaneous selections, locked inspector instances, custom type handlers, and sp
Editor Level Settings
Registers a custom inspector type handler for level-wide settings, allowing level configuration to be shown in the standard inspector panel.