diff --git a/src/Components/Modules/AssetHandler.cpp b/src/Components/Modules/AssetHandler.cpp index 73e22502..f01f2a09 100644 --- a/src/Components/Modules/AssetHandler.cpp +++ b/src/Components/Modules/AssetHandler.cpp @@ -211,6 +211,11 @@ namespace Components if (AssetHandler::AssetInterfaces.find(type) != AssetHandler::AssetInterfaces.end()) { AssetHandler::AssetInterfaces[type]->Load(&header, filename, builder); + + if (header.data) + { + Components::AssetHandler::StoreTemporaryAsset(type, header); + } } if (!header.data) diff --git a/src/Components/Modules/AssetInterfaces/IGfxImage.cpp b/src/Components/Modules/AssetInterfaces/IGfxImage.cpp index 3972a66e..7bc4ca0c 100644 --- a/src/Components/Modules/AssetInterfaces/IGfxImage.cpp +++ b/src/Components/Modules/AssetInterfaces/IGfxImage.cpp @@ -66,7 +66,6 @@ namespace Assets break; } - Components::AssetHandler::StoreTemporaryAsset(Game::XAssetType::ASSET_TYPE_IMAGE, { image }); header->image = image; } diff --git a/src/Components/Modules/AssetInterfaces/IMaterial.cpp b/src/Components/Modules/AssetInterfaces/IMaterial.cpp index fedd83ab..f4cb9274 100644 --- a/src/Components/Modules/AssetInterfaces/IMaterial.cpp +++ b/src/Components/Modules/AssetInterfaces/IMaterial.cpp @@ -124,7 +124,6 @@ namespace Assets material->textureCount = (char)textureList.size() & 0xFF; } - Components::AssetHandler::StoreTemporaryAsset(Game::XAssetType::ASSET_TYPE_MATERIAL, { material }); header->material = material; }