Asset Manager

Overview

The Asset Manager provides centralized asset loading and caching. Each asset file is loaded only once — subsequent references use the cached version automatically.

Using Assets in the Editor

Asset Browser

The Asset Browser panel displays all files in your project directory. Use it to browse and select models, textures, scripts, and other assets.

Adding Models to the Scene

There are two ways to add a model to an entity:

  1. Drag and drop — drag a .glb file from the Asset Browser into the scene
  2. Inspector — select an entity, click Add Component > ModelRenderer, and set the model path

Procedural Primitives

You can use built-in 3D shapes without any external model files. Add a ModelRenderer component and use a primitive path:

PrimitivePath
Boxprimitive:box
Sphereprimitive:sphere
Planeprimitive:plane
Cylinderprimitive:cylinder
Capsuleprimitive:capsule

Primitives are cached the same way as file-based models.

Supported Asset Types

TypeFormatsDescription
Models.glbBinary glTF models with PBR materials and skeletal data
Shaders.vert, .fragGLSL vertex and fragment shaders
Audio.wav, .mp3, .flac, .oggSound files for the audio system
Scripts.cppC++ behavior scripts

Integration Notes

  • Assets are loaded on demand and cached automatically
  • The assets directory is set automatically from the project configuration
  • Procedural primitives (primitive:* paths) are generated in memory and cached like file-based models