Cross Platform Easy Save
|
The SerializationManager class is the interface for saving and restoring object values between game sessions. More...
Static Public Member Functions | |
static void | BeginSerializeGroup (string key, params SerializationOption[] options) |
Begins the serialize group. More... | |
static void | SerializeInt32 (string key, int value, params SerializationOption[] options) |
Saves the given integer value. More... | |
static void | SerializeSingle (string key, float value, params SerializationOption[] options) |
Saves the given float value. More... | |
static void | SerializeString (string key, string value, params SerializationOption[] options) |
Saves the given string value. More... | |
static void | Serialize< T > (string key, T value, params SerializationOption[] options) |
Saves the given value. More... | |
static void | EndSerializeGroup () |
Closes a group started with BeginSerializeGroup. More... | |
static void | BeginDeserializeGroup (string key) |
Begins the deserialize group. More... | |
static int | DeserializeInt32 (string key, int defaultValue=default(int)) |
Returns the integer value associated with the given key. More... | |
static float | DeserializeSingle (string key, float defaultValue=default(float)) |
Returns the float value associated with the given key. More... | |
static string | DeserializeString (string key, string defaultValue=default(string)) |
Returns the string value associated with the given key. More... | |
static T | Deserialize< T > (string key, T defaultValue=default(T)) |
Returns the value associated with the given key. More... | |
static void | EndDeserializeGroup () |
Closes a group started with BeginDeserializeGroup. More... | |
static bool | HasKey (string key) |
Determines whether storage contains value associated with given key. More... | |
static void | DeleteKey (string key) |
Removes the value identified by the key. More... | |
static void | DeleteAll () |
Removes all the data stored in the system. Use it with caution. More... | |
static void | ClearCache () |
Removes all the data that have been cached by the serialization system. More... | |
static SerializationOption | BufferSize (int value) |
Custom serializaion option passed to specify the stream buffer size. More... | |
static SerializationOption | SerializationMethod (SerializationMethodOptions value) |
Custom serializaion option passed to specify the serialization (save) method used while serializing object. More... | |
static SerializationOption | StorageTarget (eStorageTarget value) |
Custom serializaion option passed to specify the storage location where data will be saved. More... | |
The SerializationManager class is the interface for saving and restoring object values between game sessions.
|
static |
Begins the deserialize group.
key | Name of the key associated with saved group. |
|
static |
Begins the serialize group.
Begins the serialize group.
All serialize calls enclosed inside this element will be saved in a single document. The group must be closed with a call to EndSerializeGroup.
key | A string value associated with the value. If specified key already exists, value replaces the existing value. If key is not found, new copy of value will be created in the specified storage. |
options | An optional array of serialization option specifies custom settings used for this specific operation. These options overrides the SerializationSettings values. |
|
static |
Custom serializaion option passed to specify the stream buffer size.
This option can be used for serialization mode.
value | Value. |
|
static |
Removes all the data that have been cached by the serialization system.
|
static |
Removes all the data stored in the system. Use it with caution.
Call this function to delete all the saved information. Be careful while using this. You cannot undo this action.
|
static |
Removes the value identified by the key.
key | Name of the key associated with value. |
|
static |
Returns the value associated with the given key.
Returns the value associated with the given key.
If the value doesn't already exist in the storage the function will return defaultValue.
key | Name of the key associated with value. |
defaultValue | Value to return if the specified key is not found in the storage. |
|
static |
Returns the integer value associated with the given key.
Returns the integer value associated with the given key.
If the value doesn't already exist in the storage the function will return defaultValue.
key | Name of the key associated with integer value. |
defaultValue | Integer value to return if the specified key is not found in the storage. |
|
static |
Returns the float value associated with the given key.
Returns the float value associated with the given key.
If the value doesn't already exist in the storage the function will return defaultValue.
key | Name of the key associated with float value. |
defaultValue | Float value to return if the specified key is not found in the storage. |
|
static |
Returns the string value associated with the given key.
Returns the string value associated with the given key.
If the value doesn't already exist in the storage the function will return defaultValue.
key | Name of the key associated with string value. |
defaultValue | String value to return if the specified key is not found in the storage. |
|
static |
Closes a group started with BeginDeserializeGroup.
|
static |
Closes a group started with BeginSerializeGroup.
|
static |
Determines whether storage contains value associated with given key.
true
if storage has the specified key; otherwise, false
.key | A string value used to uniquely identify the stored value. |
|
static |
Custom serializaion option passed to specify the serialization (save) method used while serializing object.
This option can be used for serialization mode.
value | Value. |
|
static |
Saves the given value.
key | A string value associated with the value. If specified key already exists, value replaces the existing value. If key is not found, new copy of value will be created in the specified storage. |
value | The value to be saved. |
options | An optional array of serialization option specifies custom settings used for this specific operation. These options overrides the SerializationSettings values. |
|
static |
Saves the given integer value.
key | A string value associated with the value. If specified key already exists, value replaces the existing value. If key is not found, new copy of value will be created in the specified storage. |
value | The value to be saved. |
options | An optional array of serialization option specifies custom settings used for this specific operation. These options overrides the SerializationSettings values. |
|
static |
Saves the given float value.
key | A string value associated with the value. If specified key already exists, value replaces the existing value. If key is not found, new copy of value will be created in the specified storage. |
value | The value to be saved. |
options | An optional array of serialization option specifies custom settings used for this specific operation. These options overrides the SerializationSettings values. |
|
static |
Saves the given string value.
key | A string value associated with the value. If specified key already exists, value replaces the existing value. If key is not found, new copy of value will be created in the specified storage. |
value | The value to be saved. |
options | An optional array of serialization option specifies custom settings used for this specific operation. These options overrides the SerializationSettings values. |
|
static |
Custom serializaion option passed to specify the storage location where data will be saved.
value | Value. |