Save and Load from XML

Save and Load Info to XML
This script will allow you to save and load data about an object into an XML file. To use, add an empty game object to the scene and attache the script to the object. Change the Player on that game object property to the item you wish to save properties about. When you start the scene, you will see a save and load button, these allow you to save and load the information from the xml file. The guts of what you save is located in the UserData class, change this as you see fit to allow you to save what you want. You will also need to update the save method to store the information that you are looking to store. At the moment, the code is only setup to store the postition of the object in world space.

Author: Zumwalt

Here's a javascript version of the same c# script:

Modify to static
Those are scripts modified to static for easy extensions. Just drag GameSateData.cs script to GameObject for use.

Links : http://unifycommunity.com/wiki/index.php?title=File:XML.zip