- Home /
The question is answered, right answer was accepted
How do I save a prefab?
Hello Unity Community!
In a scene, I instantiate a prefab that has some children. Then the user can modify some parameters, add different objects as children, modify existing children and so on.
I want to be able to save this prefab, with the current modifications, so I can instantiate it in another scene. I also want it to persist between sessions, so moving it out of view and using DontDestroyOnLoad() is out of the question.
Any ideas on how I could achieve this? Am I missing something or is it simply not possible? Maybe serialize the prefab's data somehow?
Thanks for your time!
Answer by Jeff-Kesselman · Nov 21, 2014 at 06:08 PM
Once it has been changed it is no longer an instance of the prefab. Its just another object.
You need to either make that object persist between scene loads OR serialize and deserialize it.
There is plenty of information on both techniques available with a google.