- Home /
How does one include an asset bundle locally with the build?
I made an assetbundle and I want it to be included with the game locally but I don't know where to put it and what to do to make it accessible on Android. I also of course need to be able to find it later again on Android.
Bump? Still never figured this out and need to do it eventually.
Apparently I can put it in the game's cache folder and load it from there, but idk the directory for that and I don't know where to put it in my project so it gets included in the cache when the game is installed.
You can use the Strea$$anonymous$$gAssets folder for this.
perfect thank you, i'll look into that. looks like exactly what i wanted
Answer by liortal · Jul 16, 2016 at 10:27 AM
You can use StreamingAssets. This is a special folder under your project folder (e.g: Assets/StreamingAssets) that gets included as-is into the final game output.
Please note, that on certain platforms, such as Android, when you include content in the StreamingAssets folder, you won't have direct access to it (using File system APIs for example), since the installed APK is actually compressed; in order to access it you have to use Android APIs to actually extract and load the data.
The WWW class already handles this case, so it'll take care of everything for you if you need it.
Another alternative is to use the Android APIs at runtime to load the asset bundles from StreamingAssets (more complex), or to have some custom code that extracts these files from StreamingAssets on startup and copy them to some other location that is more easily accessible (this is the option we went with).
Your answer
![](https://koobas.hobune.stream/wayback/20220612080626im_/https://answers.unity.com/themes/thub/images/avi.jpg)