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
Resource Checker – Resource Utilities

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 ExtensionseditorresourceChecker

Resource Checker – Resource Utilities

Background job utilities for resource checking: material parsing, verification, duplicate detection, unused asset scanning, texture export, and asset statistics.

Background job utilities for resource checking: material parsing, verification, duplicate detection, unused asset scanning, texture export, and asset statistics.


Overview

Worker module (~2960 lines) providing async background jobs for all resource checker operations. Parses both .cs and .json material files, runs verification passes, and reports results to the main resourceChecker UI.


Public API

FunctionSignatureDescription
M.verifyVersionM.verifyVersion(path)Checks for V0 (legacy) materials in path.
M.verifyDuplicateM.verifyDuplicate(path, skipCommon)Finds duplicated material definitions.
M.fixPIDM.fixPID(path, skipCommon)Removes deprecated persistent IDs from material files.
M.checkMatTexM.checkMatTex(path)Validates texture mappings in materials.
M.checkTexM.checkTex(path)Checks texture file format and power-of-2 compliance.
M.checkmissingMatsM.checkmissingMats(path)Finds missing material references in loaded models.
M.checkStaticM.checkStatic()Lists loaded TSStatic meshes with sizes.
M.checkForestM.checkForest()Lists available forest mesh items.
M.checkTerrainsM.checkTerrains()Lists loaded terrain blocks.
M.checkUnusedMatsM.checkUnusedMats(level)Finds unused materials in the level.
M.checkUsedMatsM.checkUsedMats(level)Lists used materials with size data.
M.checkUnusedModelsM.checkUnusedModels(level)Finds unreferenced mesh files.
M.unusedTexturesM.unusedTextures(level)Finds unreferenced texture files.
M.checkColDataM.checkColData(level)Analyzes collision mesh polygon counts.
M.removeUnusedM.removeUnused(level, unusType, selected)Permanently removes unused assets (materials, meshes, or textures).
M.removeDummyM.removeDummy(path, skipCommon)Removes dummy materials from vehicle files.
M.textureExporterM.textureExporter(path, outputPath)Converts DDS textures to PNG.
M.assetStatsM.assetStats(path)Comprehensive asset scanning with size breakdown by category.
M.duplicateDataM.duplicateData(matName)Fetches duplicate material data for resolver UI.
M.getProgressM.getProgress()Returns current background job progress (0-100).
M.stopProgressM.stopProgress()Cancels all running background jobs.
M.resaveMaterialM.resaveMaterial(path)Re-saves a material file (used after duplicate resolution).

Internal Helpers

FunctionDescription
parseMaterialFile(fn)Parses .cs or .json material file
parseMaterialFiles(files, job)Batch material parsing with yield
foreachMaterial(matTable, cb)Iterates all materials in parsed table
compactNested(map)Compacts nested issue maps removing empties
ensureValidPath(p)Validates material path format

Usage Example

-- Called by resourceChecker UI
local resourceUtil = extensions.editor_resourceChecker_resourceUtil
resourceUtil.verifyVersion("/levels/myLevel/")
local progress = resourceUtil.getProgress()

Module Variables

  • matstoRemove (any) - Module variable.
  • shapestoRemove (any) - Module variable.
  • textoRemove (any) - Module variable.
  • matstoRemove (any) - Module variable.
  • checkUnusedMatsworkJob (any) - Module variable.
  • checkUsedMatsworkJob (any) - Module variable.
  • shapestoRemove (any) - Module variable.
  • checkUnusedModelsworkJob (any) - Module variable.
  • textoRemove (any) - Module variable.
  • unusedTexturesworkJob (any) - Module variable.
  • checkColDataworkJob (any) - Module variable.
  • duplicateDataworkJob (any) - Module variable.
  • removeDummyworkJob (any) - Module variable.
  • textureExporterworkJob (any) - Module variable.

Functions

onExtensionLoaded()

Callback for extension loaded event.

Returns: self

onExtensionUnloaded()

Callback for extension unloaded event.

getSimObjects(fileName)

Returns the sim objects.

  • fileName (string)

Returns: ret

powerOfTwo(x)

Handles power of two.

  • x (any)

Returns: lg == math.floor(lg)

removeFromForestJson(shape, foresData)

Removes from forest json.

  • shape (any)
  • foresData (any)

findDuplicates(duplicatelist)

Finds duplicates.

  • duplicatelist (any)

getMaterialTexFields(mat)

Returns the material tex fields.

  • mat (any)

Returns: fields

Module Variables

  • matstoRemove (any) - Module variable.
  • shapestoRemove (any) - Module variable.
  • textoRemove (any) - Module variable.
  • matstoRemove (any) - Module variable.
  • checkUnusedMatsworkJob (any) - Module variable.
  • checkUsedMatsworkJob (any) - Module variable.
  • shapestoRemove (any) - Module variable.
  • checkUnusedModelsworkJob (any) - Module variable.
  • textoRemove (any) - Module variable.
  • unusedTexturesworkJob (any) - Module variable.
  • checkColDataworkJob (any) - Module variable.
  • duplicateDataworkJob (any) - Module variable.
  • removeDummyworkJob (any) - Module variable.
  • textureExporterworkJob (any) - Module variable.

Functions

onExtensionLoaded()

Callback for extension loaded event.

Returns: self

onExtensionUnloaded()

Callback for extension unloaded event.

getSimObjects(fileName)

Returns the sim objects.

  • fileName (string)

Returns: ret

powerOfTwo(x)

Handles power of two.

  • x (any)

Returns: lg == math.floor(lg)

removeFromForestJson(shape, foresData)

Removes from forest json.

  • shape (any)
  • foresData (any)

findDuplicates(duplicatelist)

Finds duplicates.

  • duplicatelist (any)

getMaterialTexFields(mat)

Returns the material tex fields.

  • mat (any)

Returns: fields

Additional Exports

  • M.checkColDataworkJob
  • M.checkUnusedMatsworkJob
  • M.checkUnusedModelsworkJob
  • M.checkUsedMatsworkJob
  • M.duplicateDataworkJob
  • M.findDuplicates
  • M.getMaterialTexFields
  • M.getSimObjects
  • M.matstoRemove
  • M.onExtensionLoaded
  • M.onExtensionUnloaded
  • M.powerOfTwo
  • M.removeDummyworkJob
  • M.removeFromForestJson
  • M.shapestoRemove
  • M.textoRemove
  • M.textureExporterworkJob
  • M.unusedTexturesworkJob

See Also

  • World Editor Guide - Guide

Rally Editor – Structured Pacenote Form

ImGui form for editing pacenotes in structured audio mode – corner severity, direction, length, radius change, modifiers, and caution levels.

Road Spline Group Manager

Backend manager for road spline groups - handles creation, removal, splitting, joining, serialization, terrain painting, and undo/redo operations.

On this page

OverviewPublic APIInternal HelpersUsage ExampleModule VariablesFunctionsonExtensionLoaded()onExtensionUnloaded()getSimObjects(fileName)powerOfTwo(x)removeFromForestJson(shape, foresData)findDuplicates(duplicatelist)getMaterialTexFields(mat)Module VariablesFunctionsonExtensionLoaded()onExtensionUnloaded()getSimObjects(fileName)powerOfTwo(x)removeFromForestJson(shape, foresData)findDuplicates(duplicatelist)getMaterialTexFields(mat)Additional ExportsSee Also