Fixed an issue with Actors where the material slot IDs were incorrect, and caused the displayed slot labels to be all "<unknown>" (and likely other issues).

Signed-off-by: santorac <55155825+santorac@users.noreply.github.com>
This commit is contained in:
Chris Santora
2021-07-20 12:16:12 -07:00
committed by santorac
parent 28671c8546
commit 3daf3f7d7a
4 changed files with 12 additions and 14 deletions
@@ -640,12 +640,7 @@ namespace AZ
Aabb localAabb = lod.m_subMeshProperties[i].m_aabb;
modelLodCreator.SetMeshAabb(AZStd::move(localAabb));
// Create a separate material slot for each sub-mesh
AZ::RPI::ModelMaterialSlot materialSlot;
materialSlot.m_stableId = i;
materialSlot.m_defaultMaterialAsset = lod.m_subMeshProperties[i].m_material;
modelLodCreator.SetMeshMaterialSlot(materialSlot);
modelLodCreator.SetMeshMaterialSlot(lod.m_subMeshProperties[i].m_materialSlot);
modelLodCreator.EndMesh();
}