add 'system.preserve-assets-during-frame' setting

This commit is contained in:
MihailRis 2026-03-01 21:11:58 +03:00
parent ded0964827
commit 31cb9ebd23
5 changed files with 19 additions and 9 deletions

View file

@ -51,7 +51,9 @@ void AssetsManagement::loadAssets(Content* content) {
logger.info() << "loading assets";
Shader::preprocessor->setPaths(&paths.resPaths);
auto new_assets = std::make_unique<Assets>(assetsVault);
auto new_assets = std::make_unique<Assets>(
settings.system.preserveAssetsDuringFrame.get() ? &assetsVault : nullptr
);
AssetsLoader loader(engine, *new_assets, paths.resPaths);
AssetsLoader::addDefaults(loader, content);