Currently, I've programmed the game to save data as an ES3 cache JSON file and then I sync to persistence data path while in development and not encrypted for the ease of developing the game and knowing what's in my save file.
We're now setting up the game for production so we would have to add in encryption and since the game is for mobile we have to make these JSON ES3 cached files as a binary blob, since from what I'm reading, it's the only thing Google Drive accepts.
So far encrypting the JSON files is very easy, I just added encryption types and pass in the editor, also I can make data as bytes easily with:
Code: Select all
byte[] FileInBytes = CachedFile.LoadRawBytes();
ES3.SaveRaw(FileInBytes, Path);
Code: Select all
ES3.KeyExists(MyKey, PathToSaveFile)
Code: Select all
FormatException: Cannot load from file because the data in it is not JSON data, or the data is encrypted.
If the save data is encrypted, please ensure that encryption is enabled when you load, and that you are using the same password used to encrypt the data.
ES3Internal.ES3JSONReader..ctor (System.IO.Stream stream, ES3Settings settings, System.Boolean readHeaderAndFooter) (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3JSONReader.cs:39)
1. Is there a way for me to check if a key exists with a binary file( hopefully ES3.Load should work fine too)?
2. Is there a method that loads binary data back to it's JSON form, that could be one way to fix this. Creating this myself would be so time-consuming since the file is huge, which is one reason I bought this asset as a time saver, unfortunately I didn't see this in your API? Let me know if I'm mistaken.
Thanks so much for your help!