Fixed bug
This commit is contained in:
Perfare
2019-01-13 23:21:45 +08:00
parent c3c4697562
commit 903be743ac
7 changed files with 37 additions and 18 deletions

View File

@ -380,10 +380,11 @@ namespace AssetStudio
}
}
}
else if (mesh.m_BindPose.Length > 0 && mesh.m_BoneNameHashes?.Length > 0 && mesh.m_BindPose.Length == mesh.m_BoneNameHashes.Length)
else if (mesh.m_BindPose.Length > 0 && mesh.m_BoneNameHashes?.Length > 0)
{
iMesh.BoneList = new List<ImportedBone>(mesh.m_BoneNameHashes.Length);
for (int i = 0; i < mesh.m_BoneNameHashes.Length; i++)
var boneMax = Math.Min(mesh.m_BindPose.Length, mesh.m_BoneNameHashes.Length);
iMesh.BoneList = new List<ImportedBone>(boneMax);
for (int i = 0; i < boneMax; i++)
{
var bone = new ImportedBone();
var boneHash = mesh.m_BoneNameHashes[i];