Fix assets load error regression
This commit is contained in:
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user