Fix missing material instance load failure when parameters load fails
This commit is contained in:
@@ -218,7 +218,11 @@ Asset::LoadResult MaterialInstance::load()
|
|||||||
auto baseMaterial = Content::LoadAsync<MaterialBase>(baseMaterialId);
|
auto baseMaterial = Content::LoadAsync<MaterialBase>(baseMaterialId);
|
||||||
|
|
||||||
// Load parameters
|
// Load parameters
|
||||||
Params.Load(&headerStream);
|
if (Params.Load(&headerStream))
|
||||||
|
{
|
||||||
|
LOG(Warning, "Cannot load material parameters.");
|
||||||
|
return LoadResult::CannotLoadData;
|
||||||
|
}
|
||||||
|
|
||||||
if (baseMaterial && !baseMaterial->WaitForLoaded())
|
if (baseMaterial && !baseMaterial->WaitForLoaded())
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user