API ReferenceGE Extensionseditor
Road Editor (Decal Road)
Editor extension for creating and editing DecalRoad objects: node manipulation, road selection, duplication, templates, and material filtering.
Editor extension for creating and editing DecalRoad objects: node manipulation, road selection, duplication, templates, and material filtering.
Overview
Full-featured DecalRoad editor (~1800 lines) with multi-road selection, node dragging, rectangle selection, road duplication, width adjustment, template support, and copy/paste of road properties.
Public API
| Function | Signature | Description |
|---|---|---|
M.onEditorInitialized | M.onEditorInitialized() | Registers roadEditMode with shortcuts, custom material filter, and modal window. |
M.onPreRender | M.onPreRender() | Per-frame rendering and update. |
M.onExtensionLoaded | M.onExtensionLoaded() | Extension load handler. |
M.onEditorInspectorHeaderGui | - | Custom inspector header for roads. |
M.onEditorRegisterPreferences | - | Registers road editor preferences. |
M.onEditorObjectSelectionChanged | - | Handles multi-road selection via scene tree. |
M.cycleHoveredRoadsAM | - | Action map: cycle through overlapping hovered roads. |
Edit Mode Shortcuts
| Shortcut | Action |
|---|---|
| Alt + LMB | Create road / Add node |
| Ctrl + LMB | Select multiple roads |
| Ctrl + Shift + LMB Drag | Rectangle select nodes |
| Ctrl+C / Ctrl+V | Copy/Paste road properties |
| Ctrl+D | Duplicate road |
Key Features
- Multi-road selection with Ctrl+click
- Node manipulation: drag, width adjustment, rectangle selection
- Road duplication with undo/redo
- Template system for reusable road configurations
- Material filtering by
RoadAndPathtag - AI-only road mode display text
- Fuse option for connecting roads
Usage
Accessible via the Decal Road Editor icon in the editor toolbar, or by selecting a DecalRoad object in the scene.
-- Select road edit mode programmatically
editor.selectEditMode(editor.editModes.roadEditMode)See Also
- Editor AI Tests - Related reference
- Editor AI Visualization - Related reference
- Editor – Assembly Spline Tool - Related reference
- World Editor Guide - Guide