DataSaver
This class provides static methods for saving data to PlayerPrefs (securely and unsecurely), unsecurely to JSON files or securely to *.data files and methods for loading data from there.
Available methods
This method saves custom data of type T into PlayerPrefs with certain key. In case if data has not serializable type, it will not be saved and method will return false. This method encrypts data by AES symmetric algorithm.
Example:
This method loads custom data of type T saved in PlayerPrefs with known key. In case if this key isn't presented in PlayerPrefs, it returns false.
Example:
This method saves custom data of type T into JSON file with given fileName. In case if data has not serializable type, it will not be saved and method will return false. File will be stored in persistent application data path, on Windows it will be "C:\Users\%username%\AppData\LocalLow\Heroicsolo\Heroic Engine\" directory.
Example:
This method saves custom data of type T into encoded *.data file with given fileName. In case if data has not serializable type, it will not be saved and method will return false. File will be stored in persistent application data path, on Windows it will be "C:\Users\%username%\AppData\LocalLow\Heroicsolo\Heroic Engine\" directory. This method encrypts data by AES symmetric algorithm.
Example:
This method loads custom data of type T from JSON file with given fileName. File should be stored in persistent application data path, on Windows it will be "C:\Users\%username%\AppData\LocalLow\Heroicsolo\Heroic Engine\" directory. In case if file was not found, it returns false.
Example:
This method loads custom data of type T from encrypted *.data file with given fileName. File should be stored in persistent application data path, on Windows it will be "C:\Users\%username%\AppData\LocalLow\Heroicsolo\Heroic Engine\" directory. In case if file was not found, it returns false.
Example:
Last updated