Procedural mesh generation in Update()?

So as the title suggests, I’m generating some meshes procedurally in my project. As of now they are created in Start(). I have everything working, but I would like to add some animation to them. The particular mesh in question is a cone, I was thinking of Lerping the radius of the bottom circle, so the base of the cone gets wider over time.

Is there anything wrong manipulating meshes like this? I would think its okay, especially since I have low verts and tris, approximately 1500. This is the first time I’ve worked with meshes though, so I really have no idea.

Have you read the docs of the Mesh class? it has 3 examples at the top where one of them is similar to your situation.

I’m not sure what you expect as answer to your question. It is possible to modify a mesh each frame, so one might answer simply with “yes”. However depending on your target device (and it’s capabilities / power) and how many of those objects you have, how many vertices you have, how complex your calculations are, what else you have in your scene, it might be to heavy. But the only way to get an answer to that question is: try it.

From the Unity Manual (here):

Note that if the code is executed once in the Start function then the mesh will stay the same throughout the game. However, you can just as easily put the code in the Update function to allow the mesh to be changed each frame (although this will increase the CPU overhead considerably).