- Home /
how to accumulate game objects from the game (runtime) into the current scene?
i want to make a runtime leven editor, so i need to play the game (in the editor), make the level (all the objects will be childs of an empty gameobject (Level) ) , the problem is that when i stop my game, the objects are gone. Is there a way to return from the game and save specific objects?
Thanks!
Answer by gooopil · Apr 21, 2016 at 11:48 PM
You need to look into serialization to save the state of the game. In short: - Create objects at runtime - Serialize these objects (to the disk, or save the settings for your objects to be able to reconstruct them later) - When the game start, load the objects from disk or reconstruct them
You can start with this: http://docs.unity3d.com/Manual/script-Serialization.html
Answer by Cherno · Apr 21, 2016 at 11:54 PM
You could look into my free save & load utility. It is meant to teach users the basics of serialization in relation with Unity and also serves as a base from which you can customize your own save & load system. It is perfectly useable out of the box, though.
SerializeHelper - Free save and load utility. (De)Serialize all objects in your scene.
Your answer
Follow this Question
Related Questions
Position gameObjects in circle around another gameObject 1 Answer
How to make an object visible only after grabbing other object? 0 Answers
Sharing Violation on iOS 2 Answers
Download images from url, save to device, load into UGUI 4 Answers
how can i get the previous folder of the current folder i'm working on 1 Answer