Class BaseDataPersistence
Base persistence class derived from IDataPersistence
Implements
Namespace: UnityEngine.GameFoundation.DataPersistence
Assembly: solution.dll
Syntax
public abstract class BaseDataPersistence : IDataPersistence
Constructors
Name | Description |
---|---|
BaseDataPersistence(IDataSerializer) |
Fields
Name | Description |
---|---|
k_SaveVersion |
Properties
Name | Description |
---|---|
serializer | The serialization layer used by the processes of this persistence. |
Methods
Name | Description |
---|---|
Load<T>(string, Action<ISerializableData>, Action) | 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, ISerializableData, Action, Action) | Asynchronously saves data onto the persistence layer. When the async save operation is done, onFinish Action get called. |