Asset Browser
Comprehensive asset browser window for the BeamNG editor. Provides tree-view directory navigation, asset filtering/sorting/grouping, mesh 3D previews, image inspection, drag-and-drop placement, materi
Comprehensive asset browser window for the BeamNG editor. Provides tree-view directory navigation, asset filtering/sorting/grouping, mesh 3D previews, image inspection, drag-and-drop placement, material previews, and texture set management.
Public API (Exports)
| Function | Signature | Description |
|---|---|---|
M.selectFileByPath | (path) | Selects a file by its path in the browser |
M.onEditorActivated | () | Called when editor mode activates |
M.onEditorGui | () | Main per-frame UI rendering |
M.onEditorInitialized | () | Registers window and menu items |
M.onFileChanged | (path, type) | Callback when a file changes on disk |
M.onEditorRegisterPreferences | (prefsRegistry) | Registers asset browser preferences |
M.onEditorPreferenceValueChanged | (path, value) | Responds to preference changes |
M.onEditorToolWindowGotFocus | (windowName) | Callback when window gets focus |
M.onEditorToolWindowLostFocus | (windowName) | Callback when window loses focus |
M.moveSelectionIndex | (up) | Moves the selection index up or down |
Key Features
- Directory Tree View - Hierarchical folder navigation with expand/collapse
- Asset Grid View - Thumbnail/icon grid with configurable size slider
- Filtering - Text search with path or filename modes, file type checkboxes
- Sorting - By name, file type, or asset type
- Grouping - None, by file type, or by asset type
- Saved Filters - Persist and recall named search configurations
- Mesh Preview - 3D shape preview with cached thumbnails (128px .png)
- Image Inspector - Popup with checkerboard/black/white background options
- Material Preview - Inline material sphere preview
- Drag & Drop - Drag meshes/prefabs from browser into the 3D viewport
- History - Back/forward navigation through selected directories
Asset Type Detection
| Extension | Type |
|---|---|
jpg, png, dds, tif | image |
materials.json | materials |
json | json |
ter | terrain |
prefab | prefab |
cs | datablock |
dae | mesh |
lua | lua |
html | html |
pc | part configuration |
jbeam | jbeam |
Usage Example
-- Open the asset browser from another extension
editor.showWindow("assetBrowser")
-- Access the asset browser's drag-drop data
if editor.assetDragDrop and editor.assetDragDrop.data then
local draggedPath = editor.assetDragDrop.data.path
endSee Also
- assetDeduplicator - Find and link duplicate assets
- assetManagementTool - Asset migration and link management
Editor – Assembly Spline Tool
Full-featured editor tool for placing assemblies of props (meshes) along splines with configurable spacing, offsets, distribution patterns, and terraform integration.
Asset Deduplicator
Editor tool for finding and removing duplicate asset files in the current level. Compares level files against `/assets/`, `/art/`, stock levels, and mod levels using SHA1 hashes or filename matching,