Page 1 of 1

Saving to a file.. how to?

Posted: Wed May 12, 2021 9:52 pm
by neo42
Forgive its a noob question, but I am trying to save a string to a file on my persistentDataPath, but its not happening.. Maybe I have some codes wrong that I am not able to figure out..

```

ES3Settings settings = new ES3Settings();

// Enable encryption and set an encryption password.
settings.encryptionType = ES3.EncryptionType.AES;
settings.encryptionPassword = "jjj";

var file = new ES3File(Application.persistentDataPath + "/userdata.txt", settings);
file.Save<string>("id", "myname");

```

Re: Saving to a file.. how to?

Posted: Thu May 13, 2021 7:13 am
by Joel
Hi there,

You appear to be using a deprecated API which is no longer supported. You should use ES3.Save instead. Please see the Getting Started guide for more information:

https://docs.moodkie.com/easy-save-3/getting-started/

All the best,
Joel