
Platform detection of incoming asset bundle required. By the moment tool doesn't analyze memory that used for components, only assets and Transform components are taken into account.

If you uncheck it you can analyze approximate run-time memory usage for resources in bundle. So you can check this box and analyze approximate size of resource in you bundle. Let's assume that all your bundles are compressed.

This is very useful if you want to understand why your asset bundle is so large or if you want to check that all shaders are extracted into separate asset bundle.Īlso note 'Compress' checkbox. Here you can analyze what types of resources present in your bundle and what is the amount of storage space they occupy. Also you can specify folder for temp files. Than you should select asset bundle you want to analyze in your project tab and press 'analyze' button.

After that you can open utility window from Unity menu (Tools->Analyze Asset Bundle). Tool is completely free of charge and you can integrate it in your project by simply copying this source code in your "Editor" folder. If (!AssetDatabase.IsValidFolder(assetBundleDirectory))ĪssetDatabase.CreateFolder("Assets/AssetBundles/", platformFolder) īuildPipeline.BuildAssetBundles(assetBundleDirectory, BuildAssetBundleOptions.None, platform) Ĭurrently we use 'BuildAssetBundleOptions.None' We've also tried the ForceRebuild flag but this has no effect.For those of you who lack the tool to get better understanding what is inside your asset bundle, I introduce "Asset Bundle Analyzer". Build our bundles out to the relevent platform specific folder. String assetBundleDirectory = "Assets/AssetBundles/" + platformFolder String platformFolder = platform.ToString() We convert the passed platform enum to a string. Static void BuildPlatformBundles(BuildTarget platform) BuildPlatformBundles(BuildTarget.iOS) īuildPlatformBundles(BuildTarget.Android) Here's a look at the process we're using for rebuilding assets, It's only a simple script.

We're having issues with having these bundles correctly update, when changing things on the prefab such as scale or rotation they aren't reflected in the rebuilt asset bundle. These bundles are stored online and downloaded into the main mobile application when relevant. Each AR experience is a prefab marked with a unique asset bundle name. This application is made in Unity.Īlongside this Unity project we have a second project that stores asset bundles exclusively. I have a mobile project which displays various AR experiences to the user via a mobile application.
