UnityEngine.Object DeserializeMesh() { Mesh mesh = new Mesh(); mesh.name = reader.ReadString(); mesh.vertices = reader.ReadVector3Array(); mesh.colors = reader.ReadColorArray(); mesh.uv = reader.ReadVector2Array(); mesh.normals = reader.ReadVector3Array(); mesh.tangents = reader.ReadVector4Array(); mesh.boneWeights = reader.ReadBoneWeightsArray(); mesh.bindposes = reader.ReadMatrix4x4Array(); mesh.subMeshCount = reader.ReadInt32(); for (int i = 0; i < mesh.subMeshCount; i++) { mesh.SetTriangles(reader.ReadInt32Array(), i); } return(mesh); }