mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
feat: keeping assets alive during current frame (temporary solution)
This commit is contained in:
parent
ad758fd718
commit
ded0964827
4 changed files with 27 additions and 5 deletions
|
|
@ -51,7 +51,7 @@ void AssetsManagement::loadAssets(Content* content) {
|
|||
logger.info() << "loading assets";
|
||||
Shader::preprocessor->setPaths(&paths.resPaths);
|
||||
|
||||
auto new_assets = std::make_unique<Assets>();
|
||||
auto new_assets = std::make_unique<Assets>(assetsVault);
|
||||
AssetsLoader loader(engine, *new_assets, paths.resPaths);
|
||||
AssetsLoader::addDefaults(loader, content);
|
||||
|
||||
|
|
@ -78,6 +78,7 @@ void AssetsManagement::loadAssets(Content* content) {
|
|||
}
|
||||
|
||||
void AssetsManagement::update() {
|
||||
assetsVault.clearKeepedObjects();
|
||||
if (backgroundLoaderTask) {
|
||||
backgroundLoaderTask->update();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue