Fix assets load error regression

This commit is contained in:
Wojtek Figat
2021-05-14 10:32:55 +02:00
parent 8dc9834f48
commit c95e5b0611
2 changed files with 3 additions and 3 deletions

View File

@@ -103,7 +103,7 @@ Asset::LoadResult JsonAssetBase::loadAsset()
// Load data (raw json file in editor, cooked asset in build game) // Load data (raw json file in editor, cooked asset in build game)
#if USE_EDITOR #if USE_EDITOR
BytesContainer data; BytesContainer data;
if (File::ReadAllBytes(GetPath(), data)) if (File::ReadAllBytes(_path, data))
{ {
LOG(Warning, "Filed to load json asset data. {0}", ToString()); LOG(Warning, "Filed to load json asset data. {0}", ToString());
return LoadResult::CannotLoadData; return LoadResult::CannotLoadData;
@@ -114,7 +114,7 @@ Asset::LoadResult JsonAssetBase::loadAsset()
} }
#else #else
// Get the asset storage container but don't load it now // Get the asset storage container but don't load it now
const auto storage = ContentStorageManager::GetStorage(GetPath(), true); const auto storage = ContentStorageManager::GetStorage(_path, true);
if (!storage) if (!storage)
return LoadResult::CannotLoadStorage; return LoadResult::CannotLoadStorage;

View File

@@ -135,7 +135,7 @@ protected:
{ {
AssetChunksFlag result = 0; AssetChunksFlag result = 0;
const auto cachingMode = ShaderStorage::GetCachingMode(); const auto cachingMode = ShaderStorage::GetCachingMode();
if (cachingMode == ShaderStorage::CachingMode::AssetInternal && IsNullRenderer()) if (cachingMode == ShaderStorage::CachingMode::AssetInternal && !IsNullRenderer())
result |= GET_CHUNK_FLAG(GetCacheChunkIndex()); result |= GET_CHUNK_FLAG(GetCacheChunkIndex());
return result; return result;
} }