Fix check if unsetting material slot
This commit is contained in:
@@ -26,6 +26,8 @@ void ModelInstanceActor::SetEntries(const Array<ModelInstanceEntry>& value)
|
|||||||
void ModelInstanceActor::SetMaterial(int32 entryIndex, MaterialBase* material)
|
void ModelInstanceActor::SetMaterial(int32 entryIndex, MaterialBase* material)
|
||||||
{
|
{
|
||||||
WaitForModelLoad();
|
WaitForModelLoad();
|
||||||
|
if (Entries.Count() == 0 && !material)
|
||||||
|
return;
|
||||||
CHECK(entryIndex >= 0 && entryIndex < Entries.Count());
|
CHECK(entryIndex >= 0 && entryIndex < Entries.Count());
|
||||||
if (Entries[entryIndex].Material == material)
|
if (Entries[entryIndex].Material == material)
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user