Save Data (Serialize)
Learn how to save data
For using this plugin methods you need to import the required namespace. Please include the below statement at namespace include list
using VoxelBusters.Serialization;
We provide a generic method to save(Serialize) any kind of data. For serializing data you need to specify a key. This key is used to retrieve the data back again during deserialization.
Examples
Save Int
SerializationManager.Serialize<int>("myInt",123);
Save Float
SerializationManager.Serialize<float>("myFloat",111.11f);
Save Double
SerializationManager.Serialize<double>("myDouble",129.0);
Save String
SerializationManager.Serialize<string>("myString","string value");
Save GameObject
SerializationManager.Serialize<GameObject>("gameObject",gameObjectInstance);
Save List
List<GameObject> gameObjectsList = new List<GameObject>();
....
....
....
SerializationManager.Serialize<List<GameObject>>("gameObjects", gameObjectList);
Video Tutorials
Basic SaveSave Scene ObjectsSave Custom ObjectsBatch Save CallsLast updated