How to use Asset Bundle in IOS

  1. If I use www to download a asset bundle, will it be store in hard disk and allow me to load it directly the second time from disk?
  2. How does unity load resources in the package? Does it load them in the memories even if I don’t use it?
  3. Will asset bundle accelerate the first launch loading if I put some resources in a separate asset bundle?
  4. If I just combine some in-frequent resources in the asset bundle, how should make the asset bundle together with .apk package setup in the hard disk (not downloading from www)?
  1. Yes, if you use LoadFromCacheOrDownload(). Though, there are occasionally issues where “old” bundles are cleared from the cache prematurely. Though in my experience, this has been more of an issue with streamed scenes, not really with asset bundles.

  2. Yes, it will be in memory. Once you load the asset bundle, find a reference to your asset (instantiate it or whatever) then you can call AssetBundle.Unload(false);

  3. Yes. If you have fewer assets in your first scene, it will load faster. However, since the asset bundle loads will be asynchronous, those assets won’t appear right away. Make sure you’re loading things in the background/distance that aren’t supposed to be immediately visible.

  4. You may not really get any gains from this. You can put the asset bundle in your Streaming Assets, and load it from disk from there. If you build the bundle as compressed, you can load it with AssetBundle.CreateFromFile(). With this process, you’re not really saving any space, so you might as well just put your assets in Resources. If space is a concern, you can compress it and put it in the same spot, but you need to load it with WWW.

Thanks.