Have commandlet work with default material

This commit is contained in:
Andrew Patrikalakis 2024-02-28 17:15:56 -05:00 committed by Blyron
parent d3636d241c
commit d7228f7467
1 changed files with 3 additions and 0 deletions

View File

@ -34,6 +34,9 @@ static bool ValidateStaticMesh(UStaticMesh *Mesh)
for (int i = 0; i < Mesh->StaticMaterials.Num(); i++)
{
UMaterialInterface *Material = Mesh->GetMaterial(i);
if (!Material) {
Material = UMaterial::GetDefaultMaterial(MD_Surface);
}
const FString MaterialName = Material->GetName();
if (MaterialName.Contains(TEXT("light"), ESearchCase::IgnoreCase) ||