This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static class UnitySubMeshesExtractor | |
{ | |
public static Mesh ExtractSubMesh(Mesh m, int meshIndex, int count, Transform meshRenderHolder) | |
{ | |
Vector3 pos = meshRenderHolder.position; | |
Quaternion rot = meshRenderHolder.rotation; | |
rot.y = -rot.y;// correct the translation calculation | |
var vertices = m.vertices; | |
var normals = m.normals; |