- Home /
How do you copy PersistentDataFolder between devices?
Hi all! I'm working with character save data that I want to use on our Android and iPhone build of the game to see if everything loads correctly. This data needs to be read/write hence the location.
So how would I copy the data from my computers build to the Android and iPhone build? Also is there a way to automate this process either through unity or with bash or applescript?
Answer by Subliminalman · Mar 03, 2013 at 06:21 AM
So I found a nifty tool called iFunbox which is a iPhone File Manager which is exactly what I needed so I could just drag and drop files when I need into the persistentDataFolder. It's free so hey here's a link.
Answer by Graham-Dunnett · Feb 25, 2013 at 10:29 AM
On an iOS device I'd look at UIFileSharingEnabled
which allows you to drag and drop assets onto the device using iTunes. You can then have a build of your game that knows where to get this data from. (Note that this is different from using persistent data, it's just a trivial way to test your loading.) UIFileSharingEnabled
is a flag you set in the app's plist
.
Cool, I'll check this out! It'll help with testing at least.
So I'm going to assume the only way to have save data preloaded on each device for a build is to either have it already in the resources folder or have it stored somewhere and get it with the WWW class.
This may be beyond the scope of the initial question but is there a way Unity can do a post script to make a directory on the iOS device so I may use the WWW class?
Something like the code on this page: http://docs.unity3d.com/Documentation/$$anonymous$$anual/iphone-Downloadable-Content.html
Thank you! This has led me in the right direction especially since we're doing Downloadable content.
You deserve a high five Highfive