Overview
Editor build: AssetScanner refresh on init, ContentRegistry, import via ImporterRegistry, AssetIndex, in-memory AssetCache, PrefabManager, deferred AssetFileDialog flush on postRender.
Release build: scanner/registry/dialog stripped; prefab manager remains; loading via library/index paths used by runtime.
Provides templated load<T>(AssetId&), save, import, dependency registration, fixAllAssetReferences (re-bake pipeline), and UID→AssetId resolution.
Importers include glTF (ImporterGltf + tinygltf) producing prefabs, meshes, materials, animations, skins.
How it works
init()builds subsystems; editor rescans disk.- Import: pick importer by extension → typed asset → library binary + index entry.
loadpulls from cache or deserializes container, resolvesAssetIdreferences.
Internal architecture
ModuleAssets
├── AssetIndex (UID, hash, type, paths)
├── ImporterRegistry → ImporterGltf, etc.
├── AssetCache
├── PrefabManager
├── [Editor] AssetScanner, ContentRegistry, AssetFileDialog
└── persistAsset / registerSubAsset / dependency graph
Relationships
ModuleSceneload/save uses scene assets.ModuleResourcesmaterializes GPU data from assets.ModuleFontloadsFontAsset.ModuleMusicloads sound banks.
Technical features
- Editor scan/import/cache pipeline with
AssetIndexand importers. - glTF import via tinygltf.
- Dependency graph and reference fixup (
fixAllAssetReferences). - Large editor-only paths gated with
#ifndef GAME_RELEASE.
Implementation notes
- Verified: editor scan/import/cache pipeline.
- Verified: large parts
#ifndef GAME_RELEASEgated.
