API ReferenceGE ExtensionseditordragRaceEditor
Drag Race Editor - Facilities
Manages drag racing facilities (venues containing strips). Provides CRUD operations, ImGui list/detail rendering, and 3D preview drawing.
Manages drag racing facilities (venues containing strips). Provides CRUD operations, ImGui list/detail rendering, and 3D preview drawing.
Public API
| Function | Signature | Description |
|---|---|---|
M.loadAllFacilities() | Loads all facilities via dragSaveSystem.getAllFacilities() | |
M.getAllFacilities() | → table | Returns all loaded facilities |
M.getSelectedFacilityIndex() | → number | Current selection index |
M.setSelectedFacilityIndex(idx) | Set selection index | |
M.getSelectedFacility() | → table/nil | Returns selected facility |
M.selectFacility(idx) | Select facility, update settings facilityId, clear other selections | |
M.addFacility() | Creates a new default facility | |
M.removeSelectedFacility() | Removes the selected facility | |
M.saveAllFacilities() | → bool | Saves all facilities to level dragstrips path |
M.saveFacility(facility) | → bool | Updates a facility in the list and saves all |
M.drawFacilitiesList() | Renders facility list with Add/Remove/Save/Refresh buttons | |
M.drawFacilityDetails() | Renders ID, name, description, main strip selector | |
M.drawFacilitiesPreview() | Debug-draws facility name in 3D viewport |
Facility Structure
{
id = "facility_1",
name = "New Facility",
description = "A new drag racing facility",
stripIds = {},
mainStripId = "",
metadata = { created = "...", modified = "..." }
}Detail Panel
| Field | Widget | Description |
|---|---|---|
| ID | Text input | Unique facility identifier |
| Name | Text input | Display name |
| Description | Text input | Facility description |
| Main Strip | Searchable combo | Selects from all strips in level |
| Strips | Count display | Number of associated strip IDs |
Notes
- Selecting a facility auto-updates
dragSettings.facilityIdwith the full level path - Uses
dragSaveSystem.getCurrentLevelDragPath()for save location - Facility selection clears strip and settings selections
- All facilities saved to a single
facilities.jsonfile
See Also
- Drag Race Editor Constants - Related reference
- Drag Race Editor - Drag Settings - Related reference
- Drag Race Editor - Lanes - Related reference
- World Editor Guide - Guide
Drag Race Editor - Drag Settings
Manages drag race settings files (`.dragSettings.json`). Handles loading/saving, UI rendering for settings details, phases, prefabs, and validation.
Drag Race Editor - Lanes
Manages drag racing lanes within strips. Each lane has waypoints, a boundary, color, ordering, and naming. Provides CRUD, ImGui UI, and 3D preview with axis-aligned box rendering.