class

RuntimeAssetManager

Runtime asset manager — the shipping-build counterpart of EditorAssetManager. Archives mount through the VFS (no bypass), assets load through the same AssetSerializer registry the editor uses, and async loads ride the StreamingIOQueue's priority lanes: CPU-side Import/Load on the queue's completion pool, GPU upload drained on the main thread in Update().

Module
AssetSystem
Header
#include "AssetSystem/RuntimeAssetManager.h"
Namespace
Mowo

Type aliases

AliasDescription
using LoadCallback = std::function<void(UUID, Ref<Asset>)>

Constructors

SignatureNameDescription
RuntimeAssetManager()RuntimeAssetManager
~RuntimeAssetManager() override~RuntimeAssetManager

Public functions

ReturnsNameDescription
boolInitialize
voidShutdown
voidUpdatebase tick + pending GPU uploads
voidRegisterSerializerSerializers (same registry contract as the editor)
Ref<Asset>LoadAssetLoading Sync: registry lookup → serializer Import/Load → CreateGPU → cache.
Ref<T>LoadAsset
voidLoadAssetAsyncAsync: CPU phase on a StreamingIOQueue completion thread at the given priority; the callback fires on the MAIN thread (next Update) after the GPU phase.
voidRequestPreloadStreaming integration: fire-and-forget warmup / release.
voidRequestUnload
Ref<Asset>RequestAssetAsyncPath form of RequestPreload for callers that poll every frame (a collider waiting on its proxy mesh): one IO request per asset however many times it is asked before the load lands.
boolMountArchiveArchives Mounts at the VFS root so registry source paths resolve as-is.
voidUnmountAll
boolFileExists
std::vector<uint8_t>ReadFile

Function details

RuntimeAssetManager

C++
RuntimeAssetManager()

~RuntimeAssetManager

C++
~RuntimeAssetManager() override

Initialize

C++
bool Initialize(const GPUContext& ctx) override

Shutdown

C++
void Shutdown() override

Update

C++
void Update() override

base tick + pending GPU uploads

RegisterSerializer

C++
void RegisterSerializer(Scope<AssetSerializer> serializer)

Serializers (same registry contract as the editor)

LoadAsset

C++
Ref<Asset> LoadAsset(UUID id)

Loading Sync: registry lookup → serializer Import/Load → CreateGPU → cache. Returns null when the UUID isn't registered or load fails.

LoadAsset

C++
template<typename T> Ref<T> LoadAsset(UUID id)

LoadAssetAsync

C++
void LoadAssetAsync(UUID id, LoadCallback cb, IOPriority priority = IOPriority::Normal)

Async: CPU phase on a StreamingIOQueue completion thread at the given priority; the callback fires on the MAIN thread (next Update) after the GPU phase. Already-cached assets call back from the next Update too, so callers see ONE consistent threading story.

RequestPreload

C++
void RequestPreload(UUID id, IOPriority priority = IOPriority::Low)

Streaming integration: fire-and-forget warmup / release.

RequestUnload

C++
void RequestUnload(UUID id)

RequestAssetAsync

C++
Ref<Asset> RequestAssetAsync(const std::string& sourcePath) override

Path form of RequestPreload for callers that poll every frame (a collider waiting on its proxy mesh): one IO request per asset however many times it is asked before the load lands.

MountArchive

C++
bool MountArchive(const std::string& archivePath, int priority = 200)

Archives Mounts at the VFS root so registry source paths resolve as-is.

UnmountAll

C++
void UnmountAll()

FileExists

C++
bool FileExists(const std::string& path) const

ReadFile

C++
std::vector<uint8_t> ReadFile(const std::string& path) const
Generated from AssetSystem/RuntimeAssetManager.h via assetsystem.json · Nov 4, 2026Version 1.0.0