How to edit mesh at runtime unity?

I have a ring model which have 3 materials applied on it front face. I want to modify(shrink) the width of portion of mesh any of material have, and rest other 2 materials portion of meshes fills the shrink portion of first one, Is this mesh edit possible at runtime ?

Yes, meshes have a whole API surrounding editing them: Unity - Scripting API: Mesh

Yes, you can access the vertices with

And then move them any way you want…
But that is the difficult part, mesh will easily look broken if make faces overlap or other issues.

or if you already know your min and max modification ranges,

Some alternatives could be using

other ways:

  • using Alembic format (and have precalculated data)
1 Like