Im currently playing around with serializing a SaveGame Scriptable Object and syncing it to cloud.
I save by using
Code: Select all
ES3.Save<SaveData>("save",Save);
ES3.CreateBackup("save.dat");
Loading errors out for me with following message:
I load by following code:InvalidOperationException: Trying to load data of type SaveGame, but data contained in file is type of SaveData.
ES3Reader.ReadTypeFromHeader[T] () (at Assets/Plugins/Easy Save 3/Scripts/Readers/ES3Reader.cs:273)...
Code: Select all
local = ES3.Load<SaveGame>("save");
cloudLoad(local);
At first i didn't know that i had to add the type manually, because saving worked fine even without the type. So i got the error again -> Added the type -> Still got the error.
Furthermore i have 2 questions:
#1:
Is there a way to save raw json without using the ES3 serializer and maybe just use saving+encryption of ES3? (JsonDotNet serializes and deserializes custom structures fairly well and i would love to use it in combination)
#2:
Speaking of encryption: I get an error on every start telling me
Im unsure what this tells me. I just know that my encryption key is NOT 0 long. It's 12 with numbers, upper and lowercase characters and special characters.CryptographicException: Bad PKCS7 padding. Invalid length 0.
Would be nice if i could get a hint in the right direction
Thanks for your help.