EasySave2 Mobile Questions

Easy Save 2 has been replaced by Easy Save 3, so is no longer supported.
Locked
kromenak
Posts: 1
Joined: Tue May 07, 2013 8:08 pm

EasySave2 Mobile Questions

Post by kromenak »

We're currently evaluating EasySave2 for a mobile game, and I had a couple questions that I was hoping to get some insight into.

1) When performing save/load methods, how do you handle file I/O performance? Based on the way the API is defined, it looks like you may be loading the file from disk or saving the file to disk every time you load or save a value in the file. Is that the case? Or is there some in-memory caching that occurs? On mobile, I am somewhat concerned about the overhead of performing file I/O too frequently.

2) I encountered a problem on Android in the past where Application.persistentDataPath will point to two different locations depending on whether the WRITE_EXTERNAL_STORAGE permission is specified in the manifest. Does this library take that into account, or is that something I should do in my code?

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

Re: EasySave2 Mobile Questions

Post by Joel »

Hi kromenak,

The cost of performing file I/O is negligible, especially in the grand scheme of a game engine. Caching would also use up memory, which seems to be more important, especially on mobile. If it's essential that you have caching, in Easy Save 2 you can set the save location to Playerprefs, which uses caching.

Easy Save 2 uses Application.persistentDataPath as the default location, so the WRITE_EXTERNAL_STORAGE permission will change the location. In Unity 4 (and possibly 3.5), you can go to the Android Build Settings in the editor and set Write Access to "Internal Only" or "External" to change the location, rather than modifying the manifest. This will only work if "Development Build" is not selected.

All the best,
Joel
Locked