If the problem is how to work with XML files, then I will give an example in C #.
Create a Scene class:
public class Scene { public int x { get; set; } }
Now you can create a script to work with XML.
using System.Xml.Serialization; public class WorkWithXML { public void Save(Scene sceneForSave) { XmlSerializer xmlSerializer = new XmlSerializer(typeof(Scene)); using (TextWriter writer = new StreamWriter("Scene.xml")) { serializer.Serialize(writer, sceneForSave); } } public Scene Load() { StreamReader reader = new StreamReader("Scene.xml"); Scene loadedScene = (Scene)serializer.Deserialize(reader); reader.Close(); return loadedScene; } }
In the right place in the code, call these methods by creating an instance of the WorkWithXML class or simply by making these methods static. I hope this is the appropriate answer to your question.