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.

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).