- Home /
Serialize GameObject
Hello
I have looked through numerous serialize threads and all of them want a way to serialize complex structures / whole scene states or something similar. But all I am looking is a way to same a GameObject created with OBJLoader created by AARO04130. Is there a simple way to save that GameObject into a new file so that the old .obj file is not needed anymore and later load it?
Basically I have some default prefab models that can be used by the user. But I want to add a way that a user can load new models. Right now when user creates a room with different models all the models are saved into strings
("Original name:{0};" +"name:{1};position:{2};rotation:{3};color:{4};scale:{5};TAG:{6}",)
And later loaded with
(tempObj = (GameObject)Resources.Load (pathResource + orgName);)
But is there a way to get that GameObject that was loaded from a OBJ and make it so that i can save it's info the same way I do with prefabs? Or do I have to create a new save and load script for them?
Answer by LordDarkon76 · Apr 25, 2016 at 02:38 PM
You can use JsonUtility to get the reference from the json.
Can u provide a simple example? Will this allow me do : GameObject -> JSON rep. -> GameObject
Your answer
Follow this Question
Related Questions
How to save/load references to components and prefabs 1 Answer
Android download and save "Resources.assets" 0 Answers
How can I serialize the Particles of a Particle Emitter 1 Answer
How do I save/restore a procedurally generated mesh in runtime in Unity 5? 2 Answers
Is it possible to save loaded textures and reuse after close app? 1 Answer