I’ve been toying around with mesh deformation lately, but I’ve noticed that the mesh seems to save it’s state between session - in order to make it return to its original shape I have to close out of Unity entirely. Is there any convenient way to force the mesh back to its original shape when the session ends? (Or at any point, for that matter). At the moment, my only thought is to store the initial positions of every vertex, and then restore those positions when I’m done, but I’m not entirely sure how to detect the end of the test session (when I “unclick” the play button in Unity), and feel like there ought to be a more elegant solution.
This… really shouldn’t be happening. Make sure you instantiate the mesh at the beginning of the session, and edit that- otherwise you are editing the imported base mesh, which you probably don’t want to do. Either way, you can simply use ‘OnApplicationQuit’ to detect when the session ends, but as you say that’s not very elegant.