API ReferenceGE Extensionseditor
Editor AI Visualization
Renders the AI navigation graph (navgraph) in the editor viewport with multiple color-coded draw modes for debugging road properties.
Renders the AI navigation graph (navgraph) in the editor viewport with multiple color-coded draw modes for debugging road properties.
Public API
| Function | Signature | Description |
|---|---|---|
M.enableDrawMode | (mode, enabled) | Enables/disables a draw mode (disables others when enabling) |
M.getDrawMode | () | Returns the current active draw mode name or nil |
M.onEditorGui | () | Renders the navgraph visualization each editor frame |
M.onNavgraphReloaded | () | Clears cached nodes and marks quadtree for rebuild |
Draw Modes
| Mode | Color Scheme | Description |
|---|---|---|
drivability | Red→Green gradient (0–1) | Road drivability score |
type | Blue (public) / Red (private) | Road type classification |
speedLimit | Rainbow gradient (0–36 m/s) | Speed limit visualization |
hiddenInNavi | Green (visible) / Red (hidden) | Navigation visibility |
Visualization Features
- Node spheres with radius-based sizing
- Edge prisms colored by selected draw mode
- Lane direction arrows (+ / - lanes)
- One-way road arrows
- Dijkstra-based connectivity highlighting from hovered node
- Mouse hover highlighting for nodes and links
- Quadtree-based spatial query for efficient rendering
Usage Example
-- Enable drivability visualization
editor_aiViz.enableDrawMode("drivability", true)
-- Disable all visualization
editor_aiViz.enableDrawMode("drivability", false)
-- Check current mode
local mode = editor_aiViz.getDrawMode() -- "drivability" or nilSee Also
- Editor AI Tests - Related reference
- Editor – Assembly Spline Tool - Related reference
- Asset Browser - Related reference
- World Editor Guide - Guide
Editor AI Tests
Editor tool window for debugging AI path/route planning and tuning AI driving parameters. Two tabs: Route (navgraph routing) and AI Vehicles (parameter tuning).
Editor – Assembly Spline Tool
Full-featured editor tool for placing assemblies of props (meshes) along splines with configurable spacing, offsets, distribution patterns, and terraform integration.