Search found 6 matches

by Friction
Sat Feb 27, 2021 2:41 pm
Forum: General Discussion
Topic: Loading to JSON
Replies: 3
Views: 1033

Re: Loading to JSON

Hello, I am so sorry to disturb you. I've find the solution. So here is my script: /// <summary> /// Saves all registered saveables to the save file /// </summary> private void Save() { Dictionary<string, object> saveJson = new Dictionary<string, object>(); for (int i = 0; i < saveables.Count; i++) ...
by Friction
Sat Feb 27, 2021 2:24 pm
Forum: General Discussion
Topic: Loading to JSON
Replies: 3
Views: 1033

Re: Loading to JSON

Hello again, Thank you for your quick reply. Here is my function to load saved data: private bool LoadSave(out JSONNode json) { json = null; if (!ES3.FileExists()) { return false; } json = ES3.LoadRawString(); return json != null; } I am getting "NullReferenceException: Object reference not set...
by Friction
Sat Feb 27, 2021 1:57 pm
Forum: General Discussion
Topic: Loading to JSON
Replies: 3
Views: 1033

Loading to JSON

Hello, I was saving my files as JSON. I started using Easy Save because I want to encrypt my saves. There is no problem with saving. Here is my script: private void Save() { Dictionary<string, object> saveJson = new Dictionary<string, object>(); for (int i = 0; i < saveables.Count; i++) { saveJson.A...
by Friction
Thu Dec 07, 2017 8:20 pm
Forum: General Discussion
Topic: Data as String
Replies: 13
Views: 18668

Re: Data as String

Hi again,

I can't decrypt my string data.
I'm trying this:

Code: Select all

string fromJson;
        fromJson = ES3.LoadRawString("saveFile.txt", new ES3Settings(ES3.EncryptionType.AES, "mypass"));
Is LoadRawString method supports decryption? Thanks in advance.

Best regards,
by Friction
Sat Nov 25, 2017 6:10 pm
Forum: General Discussion
Topic: Data as String
Replies: 13
Views: 18668

Re: Data as String

Hi Joel, Thanks for your quick reply. Here my new test script: using UnityEngine; public class Test : MonoBehaviour { public void Testing() { string fromJson; ES3.Save<int>("test_1", 5, "saveFile.txt"); ES3.Save<float>("test_2", 5.4f, "saveFile.txt"); ES3.Save...
by Friction
Sat Nov 25, 2017 3:37 pm
Forum: General Discussion
Topic: Data as String
Replies: 13
Views: 18668

Data as String

Hi, I want to save my data as string to server. When user logged in my game, I will get saved string and create a .json file (JSON serialization and deserialization). Is that possible with Easy Save? e.g using UnityEngine; public class Test : MonoBehaviour { string fromJson ; void Save () { ES3.Save...