Class LocalPersistence
This saves data locally onto the user's device.
Implements
Namespace: UnityEngine .GameFoundation .DataPersistence
Assembly: solution.dll
Syntax
public class LocalPersistence : BaseDataPersistence, IDataPersistence
Constructors
Name | Description |
---|---|
Local |
Basic constructor that takes in a data serializer which this will use. |
Fields
Name | Description |
---|---|
k |
Methods
Name | Description |
---|---|
Delete(string, Action, Action<Exception>) | Asynchronously delete data from the persistence layer. |
Get |
Get the file path for the given id. |
Load<TSerializable |
Asynchronously loads data from the persistence layer. Deserialized data, when loaded, are passed as second argument of the given onFinish Action. The generic param will be provided by the serializer underneath and need to implement ISerializableData |
Save(string, ISerializable |
Asynchronously saves data onto the persistence layer. When the async save operation is done, onFinish Action get called. |