We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 8426548 + d943c14 commit 721b6e0Copy full SHA for 721b6e0
1 file changed
Assets/Plugins/MeshDebugger/Editor/MeshInfo.cs
@@ -77,7 +77,8 @@ public void Update()
77
Set(ref m_Colors, m_Mesh.colors);
78
Set(ref m_BoneWeights, m_Mesh.boneWeights);
79
Resize(ref m_UVs, 4);
80
- for (int i = 0; i < m_MeshSubmeshCount; i++)
+ //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
82
{
83
m_Mesh.GetUVs(i, m_UVs[i]);
84
}
0 commit comments