Have commandlet work with default material
This commit is contained in:
parent
d3636d241c
commit
d7228f7467
|
@ -34,6 +34,9 @@ static bool ValidateStaticMesh(UStaticMesh *Mesh)
|
||||||
for (int i = 0; i < Mesh->StaticMaterials.Num(); i++)
|
for (int i = 0; i < Mesh->StaticMaterials.Num(); i++)
|
||||||
{
|
{
|
||||||
UMaterialInterface *Material = Mesh->GetMaterial(i);
|
UMaterialInterface *Material = Mesh->GetMaterial(i);
|
||||||
|
if (!Material) {
|
||||||
|
Material = UMaterial::GetDefaultMaterial(MD_Surface);
|
||||||
|
}
|
||||||
const FString MaterialName = Material->GetName();
|
const FString MaterialName = Material->GetName();
|
||||||
|
|
||||||
if (MaterialName.Contains(TEXT("light"), ESearchCase::IgnoreCase) ||
|
if (MaterialName.Contains(TEXT("light"), ESearchCase::IgnoreCase) ||
|
||||||
|
|
Loading…
Reference in New Issue