RLS Studios
ProjectsPatreonCommunityDocsAbout
Join Patreon
BeamNG Modding Docs

Guides

Reference

Server CommandsGE UtilitiesGame Engine MainNavigation GraphScreenshot CaptureServerServer ConnectionSpawnpoint ManagerSimulation TimeVehicle SpawningSuspension Frequency Tester
Editor AI TestsEditor AI VisualizationEditor – Assembly Spline ToolAsset BrowserAsset DeduplicatorAsset Management ToolSFX Previewer (Audio Events List)Audio Ribbon EditorAutoSaveBarriers EditorBiome ToolBuilding EditorBulk RenameCamera BookmarksCamera TransformCamera Path EditorCEF HelperCo-Simulation Signal EditorCrawl Data EditorCreate Object ToolDataBlock EditorDecal EditorDecal Spline EditorDocumentation HelperDrag Race EditorDrift Data EditorDrive Path EditorDynamic Decals Tool (Vehicle Livery Creator)Engine Audio DebugExtensions DebugExtensions EditorFFI Pointer Leak TestFile DialogFlowgraph EditorForest EditorForest ViewEditor Gizmo HelperEditor Ground Model Debug HelperEditor Headless Editor TestEditor Icon OverviewEditor ImGui C DemoEditor InspectorEditor Layout ManagerEditor Level SettingsEditor Level ValidatorEditor LoggerEditor Log HelperEditor MainEditor Main MenuEditor Main ToolbarEditor Main UpdateMap Sensor EditorMaster Spline EditorMaterial EditorMeasures Inspector HeaderMesh Editor (Base)Mesh Road EditorMesh Spline EditorMission EditorMission PlaybookMission Start Position EditorMulti Spawn Manager (Vehicle Groups)Navigation Mesh EditorEditor News MessageObject Tool (Object Select Edit Mode)Object To Spline EditorParticle EditorPerformance Profiler / Camera RecorderPhysics ReloaderPrefab Instance EditorEditor PreferencesRace / Path EditorRally EditorRaycast Test Editor ToolRenderer Components Editor ToolRender Test Editor ToolResource Checker Editor ToolRiver EditorRoad Architect EditorRoad DecorationsRoad Editor (Decal Road)Road Network ExporterRoad River Cache HandlerRoad River GUIRoad Spline EditorRoad Template EditorRoad UtilitiesScene TreeScene ViewScreenshot Creator BootstrapScript AI EditorScript AI ManagerSensor Configuration EditorSensor DebuggerShape EditorShortcut LegendSidewalk Spline EditorSites EditorSlot Traffic EditorSuspension Audio DebugTech Server ManagerTerraform ToolTerrain And Road ImporterTerrain EditorTerrain Materials EditorText EditorTool ManagerTool ShortcutsTraffic DebugTraffic ManagerTraffic Signals EditorUndo History ViewerVehicle Bridge TestVehicle Detail ViewerVehicle Editor MainEditor - VisualizationEditor Viz HelperEditor Water Object HelperEditor Windows Manager

UI

Resources

BeamNG Game Engine Lua Cheat SheetGE Developer RecipesMCP Server Setup

// RLS.STUDIOS=true

Premium Mods for BeamNG.drive. Career systems, custom vehicles, and immersive gameplay experiences.

Index

HomeProjectsPatreon

Socials

DiscordPatreon (RLS)Patreon (Vehicles)

© 2026 RLS Studios. All rights reserved.

Modding since 2024

API ReferenceGE Extensionseditor

Scene Tree

The editor's scene tree window - a hierarchical tree view of all scene objects with filtering, drag-and-drop reordering, multi-selection, prefab support, virtual scrolling, and undo/redo for group ope

The editor's scene tree window - a hierarchical tree view of all scene objects with filtering, drag-and-drop reordering, multi-selection, prefab support, virtual scrolling, and undo/redo for group operations.


Public API (Key Functions)

FunctionSignatureDescription
M.onEditorGui()Main GUI render loop - handles all scene tree instances
M.onEditorInitialized()Registers windows, preferences, object class icons
M.onEditorObjectSelectionChanged()Updates tree node selection state to match editor selection

Key Features

  • Multiple instances: Via guiInstancer - each instance has independent state
  • Search & filter: By name, ID, persistent ID, class, or all; with distance-based range filtering
  • Virtual scrolling: Efficient rendering of large scene trees
  • Drag and drop: Reorder objects between groups with undo support
  • Breadcrumb path: Shows parent hierarchy of selected node
  • Prefab V2 support: Package/unpackage/convert operations in context menu
  • Node operations: Rename, delete, duplicate, create groups, sort, collapse, hide/lock toggles

Search Modes

ModeSearches
SearchMode_NameDisplay name and object name
SearchMode_IDObject ID
SearchMode_PersistentIDPersistent ID
SearchMode_ClassClass name
SearchMode_AllAll of the above

Scene Tree Node Structure

local node = {
  id = 123,              -- Object ID
  name = "MyObject",
  displayName = "MyObject (shape.dae)",
  className = "TSStatic",
  icon = editor.icons.shape,
  open = false,
  selected = false,
  isGroup = false,
  isExpandable = false,
  parent = parentNode,
  children = {},
  renderChildrenOrder = {},
  listIndex = 1,         -- Virtual scroll index
}

Notes

  • Max group nesting: 30 levels (protection against cyclic references)
  • Expandable classes: PrefabInstance, SimGroup, SimSet
  • TSStatic nodes display shape filename; DecalRoads display material name
  • Uses socket.gettime() for rename delay timing

Functions

M.onEditorActivated()

Callback for editor activated event.

M.onEditorSaveGuiInstancerState(state)

Saves per-instance scene tree state (scroll position, open nodes, etc.).

  • state (table)

M.onEditorLoadGuiInstancerState(state)

Restores per-instance scene tree state.

  • state (table)

M.onExtensionLoaded()

Initializes scene tree on extension load.

M.onEditorAfterOpenLevel()

Recaches all scene tree nodes after a level is opened.

M.onEditorToolWindowGotFocus(windowName)

Handles focus gained on scene tree window.

  • windowName (string)

M.onEditorToolWindowLostFocus(windowName)

Handles focus lost on scene tree window.

  • windowName (string)

M.onEditorBeforeSaveLevel()

Pre-save cleanup for scene tree state.

M.onEditorObjectAdded()

Updates scene tree when new objects are added to the scene.

M.onEditorInspectorFieldChanged(selectedIds)

Refreshes node names when inspector fields change.

  • selectedIds (table)

M.moveSelectionIndex(up)

Moves the selection highlight up or down in the tree.

  • up (boolean)

M.refreshNodeNames(objectIds)

Refreshes display names for specific object IDs.

  • objectIds (table)

M.refreshAllNodes(incomingObjectIds)

Refreshes all scene tree nodes, optionally limited to specific IDs.

  • incomingObjectIds (table|nil)

M.recacheAllNodes(keepOpenStatus)

Full recache of all scene tree nodes from the scene graph.

  • keepOpenStatus (boolean)

M.closeAllInstances()

Closes all scene tree window instances.

M.openSceneTree()

Opens a scene tree window instance.

M.debugNode(id, level)

Debug: prints node hierarchy to console.

  • id (number)
  • level (number)

See Also

  • Editor AI Tests - Related reference
  • Editor AI Visualization - Related reference
  • Editor – Assembly Spline Tool - Related reference
  • World Editor Guide - Guide

Road Utilities

Utility module for road template operations - handles template loading, child road creation, decoration placement, random decal generation, and material management.

Scene View

Provides additional scene view windows in the editor - supports 3D, orthographic, camera path, and vehicle-attached view modes with configurable frustum, clipping, and debug draw masks.

On this page

Public API (Key Functions)Key FeaturesSearch ModesScene Tree Node StructureNotesFunctionsM.onEditorActivated()M.onEditorSaveGuiInstancerState(state)M.onEditorLoadGuiInstancerState(state)M.onExtensionLoaded()M.onEditorAfterOpenLevel()M.onEditorToolWindowGotFocus(windowName)M.onEditorToolWindowLostFocus(windowName)M.onEditorBeforeSaveLevel()M.onEditorObjectAdded()M.onEditorInspectorFieldChanged(selectedIds)M.moveSelectionIndex(up)M.refreshNodeNames(objectIds)M.refreshAllNodes(incomingObjectIds)M.recacheAllNodes(keepOpenStatus)M.closeAllInstances()M.openSceneTree()M.debugNode(id, level)See Also