Just doesn't load saves.

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
purpleduck
Posts: 6
Joined: Fri Jun 14, 2013 3:29 pm

Just doesn't load saves.

Post by purpleduck »

I have no idea why. I just can't get past the first test with EasySave.

I am using Playmaker. I use Save String to save a string variable to a text file...and it DOES that.

What it doesn't do is loading. By using Exists, it simply tells me the save file doesn't exist. It's ridiculous. It does not think it exists. Yet it's there.

By default it saves on /Users/jordan/Library/Caches/UnityTouchTests.

Also I would like to know how to change the save folder. This is for an eventual iOS project.

Thanks.
User avatar
Joel
Moodkie Staff
Posts: 4852
Joined: Wed Nov 07, 2012 10:32 pm

Re: Just doesn't load saves.

Post by Joel »

Hi there,

Please could you send me the code you are using to save and load, either in this thread or via a PM.

All the best,
Joel
purpleduck
Posts: 6
Joined: Fri Jun 14, 2013 3:29 pm

Re: Just doesn't load saves.

Post by purpleduck »

I found the problem, it was very simple: I used to different tags for the save and loaded file. Apparently they have to be the same.

Question, how do I change the saved files location? This is for an iOS game. Should I leave the default one?
User avatar
Joel
Moodkie Staff
Posts: 4852
Joined: Wed Nov 07, 2012 10:32 pm

Re: Just doesn't load saves.

Post by Joel »

Hi there,

Glad you found a solution. You should leave the save location as the default location unless you have a good reason to change it, especially on mobile, as there are tight security restrictions on where you can save.

However, if you do need to specify a specific save location, Easy Save 2 accepts an absolute path. For example, these will both save to the same location:
ES2.Save(myData, "myFile.txt");
ES2.Save(myData, "/Users/*username*/Library/Caches/*project name*/myFile.txt");
More info on paths can be found HERE.

Regards,
Joel
purpleduck
Posts: 6
Joined: Fri Jun 14, 2013 3:29 pm

Re: Just doesn't load saves.

Post by purpleduck »

So leaving the default location will save on desktop and also mobile in the predicted folder? works on iOS and Android, Linux as well? shouldn't worry about location at all?
User avatar
Joel
Moodkie Staff
Posts: 4852
Joined: Wed Nov 07, 2012 10:32 pm

Re: Just doesn't load saves.

Post by Joel »

Hi there,

That is correct, it'll work on the platforms you specified, though it'll save in different places on each platform. To be precise, it'll save in the folder specified by the Application.persistentDataPath variable, which is guaranteed to be a safe location to save to. The only exception to this is when saving to web, when it will save to the registry for security reasons.
purpleduck
Posts: 6
Joined: Fri Jun 14, 2013 3:29 pm

Re: Just doesn't load saves.

Post by purpleduck »

Excellent, then it's truly a simple to use tool. Thank you.
Locked