Fix mesh index errors

This commit is contained in:
Perfare 2020-08-12 02:24:08 +08:00
parent ec0a2a47f1
commit 422851cdab
1 changed files with 2 additions and 1 deletions

View File

@ -446,7 +446,7 @@ namespace AssetStudio
public sealed class Mesh : NamedObject
{
private bool m_Use16BitIndices = true; //3.5.0 and newer always uses 16bit indices;
private bool m_Use16BitIndices = true;
public SubMesh[] m_SubMeshes;
private uint[] m_IndexBuffer;
public BlendShapeData m_Shapes;
@ -550,6 +550,7 @@ namespace AssetStudio
((version[0] == 2017 && version[1] == 3) && m_MeshCompression == 0))//2017.3.xfx with no compression
{
var m_IndexFormat = reader.ReadInt32();
m_Use16BitIndices = m_IndexFormat == 0;
}
int m_IndexBuffer_size = reader.ReadInt32();