Skip to content

Commit 721b6e0

Browse files
authored
Merge pull request #5 from Riskjockey/modifications
2 parents 8426548 + d943c14 commit 721b6e0

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Assets/Plugins/MeshDebugger/Editor/MeshInfo.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ public void Update()
7777
Set(ref m_Colors, m_Mesh.colors);
7878
Set(ref m_BoneWeights, m_Mesh.boneWeights);
7979
Resize(ref m_UVs, 4);
80-
for (int i = 0; i < m_MeshSubmeshCount; i++)
80+
//uvs are resized to be no more than 4, but if SubMeshCount > 4 then IndexOutOfRangeException would be thrown
81+
for (int i = 0; i < m_MeshSubmeshCount && i < m_UVs.Length; i++)// extra range check fixes this
8182
{
8283
m_Mesh.GetUVs(i, m_UVs[i]);
8384
}

0 commit comments

Comments
 (0)