Loading AssetBundles stored locally on iPhone

Hi there,

I’m using Unity iPhone Advanced 1.5.1f2, and I’m trying to load AssetBundles which I need to store locally on the iPhone.

My questions are:

  1. Is this even possible?
  2. I imagine that I should be able to do this streaming from a “file://” link, but how would I go about copying the AssetBundles to the device and which path would I use?

I’ve been searching for info for quite a while to no avail, so any help would be greatly appreciated.

  1. yes by 1.5.1 it is

  2. you would download it through tcp and store it into the documents folder (System.IO will help here) of your app for later usage through the file:// protocol
    Unsure if asset bundles potentially get cached on their own, didn’t experiment with them any deeper on the iphone yet as I first need the game before I need addon content :wink:

Makes sense. Thanks a lot for the quick reply!

Will try it and post results. :slight_smile:

Hmmm sorry, I thought of something right after submitting the previous post.

Does this mean that players would need to have the AssetBundles downloaded prior to playing for the first time? I’m fearing that will not be an option for me.

If so, is there any way to have them included with the build for distribution?

if you want it in the game anyway, there is no reason not to put it straight into the player right from the start

That’s what I’m trying to do.

However the reason I’m using AssetBundles and not the Resources folder is because I need to load/unload them in runtime to save memory.

I thought of adding the AssetBundles into the XCode project manually, is this possible? How would I do it?

there is a special folder where you can put them in, thats the iPhoneStreamingAssets which you would put next to the Assets folder. See the iphone script reference article on PlayMovie

Looks exactly like what I need.

Thanks again, you’ve been truly helpful! :smile: