iPhone data management and paths?

Hi!

What is the good way of including external assets into an iPhone project?

By external, I mean assets that are not part of unity such as, for exemple, a local AssetBundle file. I’ve tried to add it to the MyApp.app/Data dir using a copy file script in xcode, but the file doesnt seem to be copied in the iPhone app… :cry:

How can I include an external file in my app and retrieve its path…

Thank you very much for your help! :slight_smile:

–
David

I touched on this a little in my blog post about reading text data into Unity games:

The short answer is that you can’t directly include such a file with your game install. (This seems to be true for all apps, not just Unity-built apps.) Your app can however create files in its writeable Documents folder. So what games tend to do is create whatever files they need when they are launched for the first time.

Note also that these files are preserved when an update to the app is installed. So this is probably where you’d put in-game downloadable content, for instance.

(There is a trick to getting the path to the documents folder, which I also describe in the blog post, though I first learned of it in these forums.)

This thread explains a way to do it:
http://forum.unity3d.com/viewtopic.php?t=37510

If you put the assets you want into the iPhoneStreamingAssets folder they get included in the app bundle and can be read from there.