- Home /
Store a mesh's geometry at runtime for later retrieval
What is the best way to save or store a mesh's geometry - for a usage case, such as using it to restore an earlier mesh state at a later time?
Right now, my workaround is to use ObjExporter to convert it to a String, and then to reconvert it back.
Answer by Mike 3 · Jan 03, 2011 at 05:03 PM
Easiest way would be to instantiate a clone:
var m = Instantiate(originalMesh) as Mesh;
if you were to rewrite it with another mesh ("save a new state as previous"), can you rewrite it to the same global variable m
?
Sure, shouldn't be an issue. Just make sure you call Destroy(m) first to destroy the old one, otherwise you'll end up with a memory leak
hmm any advice on saving at runtime for later retrieval (after ter$$anonymous$$ation) http://answers.unity3d.com/questions/34828/save-meshfilter-for-retrieval-even-after-app-ter$$anonymous$$ation-iphone-android
Your answer
Follow this Question
Related Questions
Obtaining a perpendicular point? 1 Answer
Trying to create a hard edged procedural torus mesh 2 Answers
Seperating hulls in mesh 0 Answers
Generating Mesh at runtime, vertex count different 0 Answers