Undo after mesh vertices modification.

I’m writing a mesh deforming editor plugin, does anyone know how to undo a mesh deformation operation?

I have tried to use Undo.RecordObject to the MeshFilter.mesh/sharedMesh before i deform the mesh, but I can’t back to the original mesh state after I modified the vertices :frowning:

You could copy vertices vector3 array and keep it as default size, and when inverting back just set current vertices vector3 array as this default, simple for loop will do the trick.

This thread has been helpful to me.