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
@@ -96,9 +96,10 @@ namespace AZ
skinnedSubMesh.m_vertexCount = aznumeric_cast<uint32_t>(subMeshVertexCount);
lodVertexCount += aznumeric_cast<uint32_t>(subMeshVertexCount);
skinnedSubMesh.m_material = lodAsset->GetMaterialSlot(modelMesh.GetMaterialSlotIndex()).m_defaultMaterialAsset;
skinnedSubMesh.m_materialSlot = lodAsset->GetMaterialSlot(modelMesh.GetMaterialSlotIndex());
// Queue the material asset - the ModelLod seems to handle delayed material loads
skinnedSubMesh.m_material.QueueLoad();
skinnedSubMesh.m_materialSlot.m_defaultMaterialAsset.QueueLoad();
subMeshes.push_back(skinnedSubMesh);
}