- Home /
C# Preserving GameObjects' Previous Meshes
Hello everyone, I have a problem. In my scene I have several gameobjects that will have their meshes change.I want the meshes that they had previously be preserved in someway so I can change them back to their original meshes. Do you guys have any suggestions? I was thinking of preserving them in a variable but I'm not sure how.
Answer by EternalClickbait · Aug 01, 2020 at 09:59 PM
You could try simply copying/saving the Mesh
component from the gameobject, but that most likely won't be helpful if the vertices on the mesh are changing (your copy of the mesh will also change). The simplest way I can think of is to copy the vertices and triangles to another variable, and store that instead. If you want to, you can also try saving the vertex colours, but that probably won't be necessary
Your answer
Follow this Question
Related Questions
C# Array of OtherArray's Meshes 1 Answer
C# Rotate GameObjects Regardless of List Size 2 Answers
C# Change Script Help 1 Answer
C# GameObject Reverses Z Rotation 0 Answers
C# Throw GameObject Upon Mouse Click 1 Answer