Including bundleassets into a build

Hi, I’m using BuildPipeline.BuildAssetBundle() to create some bundleasstes and include them into a build (I’m planning to release the build for both desktop and mobile platform): do I have to simply include the bundleasset files in the Resource folder or do I have to create an helper script that first download them via WWW.LoadFromCacheOrDownload(), hence giving them an initial version, and then rebuild the entire game including these pre-downloaded assetbundles? Or will WWW.LoadFromCacheOrDownload take for granted that a freshly built (i.e. not downloaded via WWW.LoadFromCacheOrDownload) bundleassets is at version 0, so it can load them without redownloading? Is there a way to pre-populate the caching of the bundleassets to distribuite the builds with the cache already loaded?
Many thx

You can use the StreamingAssets folder to include your AssetBundles in the build. You can include any file in the StreamingAssets folder.

Then in your application you can load them direcly using “WWW.LoadFromCacheOrDownload” or “new WWW”. With LoadFromCacheOrDownload the AssetBundles are extracted and saved in the AssetBunble cache folder for the application. You may want to avoid this as it means you are using more disk space. The benefit of this is that AssetBundles are cached uncompressed, therefore they load faster.

With “new WWW” the AssetBundles are not cached on disk, but they will need to be uncompressed every time. You can avoid this by creating uncompressed versions of your AssetBundles.

Have a look at the documentation for more information:

StreamingAssets folder

AssetBundles & WWW