API ReferenceGE Extensionseditor
Road River Cache Handler
Handles cache invalidation for DecalRoad vertices when prefabs are exploded and when the editor initializes.
Handles cache invalidation for DecalRoad vertices when prefabs are exploded and when the editor initializes.
Public API
| Function | Signature | Description |
|---|---|---|
M.onEditorPrefabExploded | (groups) | Iterates exploded prefab groups and updates DecalRoad vertices for any DecalRoad objects found |
M.onEditorInitialized | () | Calls editor.initializeLevelRoadsVertices() to rebuild all road vertex caches on startup |
Hooks
| Hook | Purpose |
|---|---|
onEditorPrefabExploded | Ensures DecalRoad geometry is refreshed after a prefab is unpacked |
onEditorInitialized | Ensures all level roads have valid vertex data at editor startup |
Usage Example
-- Automatically called by the editor system:
-- When a prefab containing DecalRoads is exploded, vertices are updated.
-- No direct usage needed - hooks are registered automatically.Notes
- Very small module (~25 lines) focused on cache consistency
- Uses
scenetree.findObject()to locate DecalRoad objects by name - Depends on
editor.updateRoadVertices()andeditor.initializeLevelRoadsVertices()
See Also
- Editor AI Tests - Related reference
- Editor AI Visualization - Related reference
- Editor – Assembly Spline Tool - Related reference
- World Editor Guide - Guide