- Home /
Save gameobject
I want to make a checkpoint which save the objects that are in the scene. For instance, there are 3 boxes. And the player destroys 2 boxes. So there is only a box left. Then, the game is saved. When the player loads last checkpoint, I want player to see only 1 box and not 3 boxes. Thx in advance!
Please, be more specific! Are you trying to save the state of a game between sessions? Or are you talking about the editor here? In any case, assu$$anonymous$$g the former, there are a lot of ways you could go about doing this. For most of them, think about how you would simplify your scene to just the parts which need to be saved, so that you can put all of that into a single, serializable object, and use .net binary formatters etc. to pump that data into a file you can retrieve later.
Answer by The-Oddler · Oct 22, 2011 at 03:37 PM
There is no automated way to do this in-game. You'll have to write saving and loading code yourself.
Look at the following question, very good answer there: http://answers.unity3d.com/questions/8480/how-to-scrip-a-saveload-game-option.html
Also, you might want to vote for this feature here: http://feedback.unity3d.com/forums/15792-unity/suggestions/553355-scripting-save-load-in-game
Hope this helps, -Pablo
Your answer