Page 1 of 1

Setting up Easy Save properly

Posted: Wed Apr 10, 2019 11:09 am
by krmko
Hello Joel,

excuse my ignorance, but i'm having difficulties setting up easy save. I'm working with Playmaker, i've got all the save and load stuff managed.

Image

Image

However, i'm not sure how to make the text file that will be used for saving. I made one and put it in the assets folder, but since it's not in the scene it's not included in the build.

This is the setting

Image

I also tried setting the Default Save Location to File, but it's the same, defaultFile.txt is not appearing in the build nor when i run the game and save the variables. I don't want to use absolute path since that can only make problems.

ES3 was cool in that regard since i had ES3 File Create action where i could create the file on runtime, but i'm not sure how to do it with ES2.

Also, when i load and save, should i just put defaultFile.txt in the filename or should i get persistent path and append defaultFile.txt string then use that string to load data?

Re: Setting up Easy Save properly

Posted: Wed Apr 10, 2019 5:41 pm
by Joel
Hi there,

You do not need to create the file, this will be created automatically if it doesn't exist. If you don't specify a path, this will be created in Unity's Application.persistentDataPath, which is the only path guaranteed to be writable at runtime.

You can access this path in the Editor by going to Window > Easy Save 3 > Tools > Open Persistent Data Path.

Note that the Assets folder will not exist at build time because it is usually compiled into the executable.

All the best,
Joel

Re: Setting up Easy Save properly

Posted: Thu Apr 11, 2019 6:05 pm
by krmko
Hello Joel,

All clear and all functioning now, thanks a lot.