- Home /
Calling 'new Mesh()' takes more than 200ms
I'm creating (and destroying) some meshes at runtime, and I observed something really surprising with the profiler.
Sometimes, for unknown reason, this single line of code will take more than 200 ms to execute:
Mesh mesh = new Mesh();
Does anyone know what can possibly happen? Maybe the creation of a new instance of Mesh triggers something else in Unity (I don't know, maybe effectively destroying previous meshes on which I called Destroy() before?)...
have you tried using the deep profiling option? what's happening to the memory during that frame?
Your answer
Follow this Question
Related Questions
Number of vertices for android 0 Answers
Should I actually model the bevel for my mesh object, or use bump mapping? 1 Answer
Cube object, slightly rounded edges? - shader? 2 Answers
Mesh collider cost 1 Answer
Simpler mesh over distance 1 Answer