- Home /
Save & Load function for Instantiated objects
I need someone that can point me into the right direction.
What I'm doing: I'm programming a sim application where the user can place (instantiate) objects in a 3D world. After he places an object, the user has the ability to move it, rotate it and destroy it.
What I'm looking for: What's the best way to create a save and load function for an application like this. Eventually I'd want the user to be able to give the save file a custom name and have a load/save menu where he'll see a list of previous saved games that he can delete and/or load.
I've been trying some stuff with UnitySerializer and XmlSerializer, but my application is programmed in C# and my Javascript knowledge is pretty much zero, so the example scripts in UnitySerializer weren't helping me. And the XmlSerializer only works for me when running the project in Unity, but not in a build.
Any help would be greatly appreciated!
Unity Serializer has examples in both C# and Javascript.
It does? I probably missed it. Does it have a similair script like the Pause$$anonymous$$enu in C#? If so, could you tell me where to look? (:
TestSerialization.cs SaveAndLoad.cs SaveAndLoadToServer.cs SaveAndReload.cs
Any Exceptions or errors when you try to use the XmlSerializer in a build? Perhaps it just can't find the location you specified?
I got it to work with the TestSerialization.cs right now, thanks! The only thing that's going wrong is that when I load a game, it re-activates some scripts that I turned off beforehand. Any idea what might be the cause of this?