I have released my generic Save/Load game code on 100% free public MIT license. Available here: http://whydoidoit.com/unity-serializer-v0-2/
UnitySerializer is a full level serialisation plug in. It enables you to save the progress of a game and restore it at some point in the future. It does this with minimal impact on the design of your game and requires minimal modification to your behaviours and classes.
UnitySerializer has been tested working on iOS and should work fine on Droid.
The serializer supports storing newly instantiated prefabs, as well as the status of existing scene objects (such as those that might be destroyed during the course of a game).
UnitySerializer supports the serialization of your custom classes and properties as well as standard Unity components
* Animation support
* Rigidbody support
* Support for NavMeshAgent (although the agent must recalculate its path on restoration)
* Transform – including parent/child relationships
* Important: UnitySerializer cannot store the current state of an iTween at present, due to the way in which iTween works. If you need path following you can use the code found elsewhere on this blog which will resume fine.
In addition, presuming you use my extended coroutine start functions, all of your coroutines will continue executing from the point that they left off and will be restored with all local variables intact. You need make no changes to your coroutines – just to the way that you start them.
The status of your level is stored in a string which can be placed in PlayerPrefs – stored on a server or in a file.
↧