Last active
June 7, 2016 14:27
-
-
Save RichLogan/b7b1f4f214d47e7f2145c984acbe6860 to your computer and use it in GitHub Desktop.
Dynamic Meshes
This file contains hidden or 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
_mesh = new Mesh(); | |
_mesh.name = "Line Mesh"; | |
_mesh.MarkDynamic(); | |
// Some mesh manipulation occurs here | |
_mesh.Optimize(); | |
_mesh.UploadMeshData(true); | |
Debug.Log(_mesh.isReadable); // showing false | |
byte[] serialised_mesh = MeshSerializer.WriteMesh(_mesh, false); | |
// Mesh Serializer basically reads mesh.vertices, mesh.normals etc etc. | |
Debug.Log(serialised_mesh.Length); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment