Cross Platform Easy Save
  • Introduction
  • What is Serialization & De-Serialization
  • Plugin Setup and Usage
  • Supported Data Types
  • Save Data (Serialize)
  • Load Data (Deserialize)
  • Extending Support for any data type
  • Release Notes
  • FAQ
  • Advanced
    • Get as Byte Stream
  • Video Tutorials
    • Plugin Setup
    • Package Contents
    • Basic Save
    • Save Scene Objects
    • Save Custom Objects
    • Batch Save Calls
Powered by GitBook
On this page
  • Compiler throwing Serialization method not found. What's the reason?
  • How to serialize any data type?
  • Example
  • What are data providers shipped with the plugin?
  • What happens if I don't create Data Provider for my own custom class?

FAQ

Compiler throwing Serialization method not found. What's the reason?

Please make sure you import the required namespace as below.

using VoxelBusters.Serialization;

How to serialize any data type?

Use the generic method shipped with the plugin.

SerializationManager.Serialize<T>(string key, T value);

Example

SerializationManager.Serialize<int>("intKey", 123);
SerializationManager.Serialize<string>("stringKey", "my string");
SerializationManager.Serialize<GameObject>("gameobjectKey", gameObjectInstance);

What are data providers shipped with the plugin?

Data providers are the concrete classes which are created to maximise the performance during serialization process. These classes are required if you want the serialization process to avoid reflection.

What happens if I don't create Data Provider for my own custom class?

By default, if we don't find a data provider, we directly use reflection to fetch the public properties and serialize it.

However, if you want to squeeze out maximise performance, create the data provider with our inbuilt tool which does create the code automagically!

PreviousRelease NotesNextGet as Byte Stream

Last updated 6 years ago