-
Notifications
You must be signed in to change notification settings - Fork 0
Data Providers
TinyPlay edited this page Aug 5, 2022
·
1 revision
Data provider classes used to serialize / deserialize objects from / to files. You can use it to load/save your game models. Data providers in the XDot Framework contains also encrypted feature.
You can use one of this loader out-of-the-box:
- JsonDataLoader - to serialize / deserialize objects using Unity Json Serializer;
- XmlDataLoader - to serialize / deserialize objects using Xml format;
- BinaryDataLoader - to serialize / deserialize objects using Binary Formatter;
- EncryptedDataLoader - to serialize / deserialize objects using Unity Json Serializer and AES encryption;
Data Loader Usage Example:
EncryptedDataLoader<MyModel> dataLoader = new EncryptedDataLoader<MyModel>(path);
MyModel model = dataLoader.LoadData((MyModel)_currentModel);You can write your own data loader with XDot Framework interfaces.
Basic Data Loader Interface:
namespace XDot.DataLoader
{
public interface IDataLoader<TData> where TData : class
{
void SaveData(TData dataToSave);
TData LoadData(TData inputObject = null);
}
}This framework is under MIT license. Developed by Ilya Rastorguev specially for Pixel Incubator.
You can ask me about XDot Framework using Telegram @SodaBoom or by email: iliya-sdt@yandex.ru