How do I build an uncompressed asset bundle with no scenes?

I would like to build asset bundles for each localized version of my game. I will include the fonts and audio files as well as all the localized strings in each bundle. I have managed to figure out how to bundle them and load them at runtime but it takes time to decompress them.

According to this link here, I should be able to build uncompressed asset bundles and load them using AssetBundle.CreateFromFile but it is not working and the editor returns an error (below) when it attempts to build the editor script.

The Error in question:
error CS0117: UnityEditor.BuildAssetBundleOptions' does not contain a definition for UncompressedAssetBundle’

So basically, it appears Unity dropped support for “UncompressedAssetBundle” somewhere along the way but left it up on their Script Reference.

Also, I am using the latest version of Unity 3.5.

Any help would be greatly appreciated.

2 Answers

2

The link you included points to the latest (4.1) version of the docs. Rather than Unity dropping support for this and stupidly leaving it in the docs, it looks to me like Unity added this feature at 4.x. (Simply add 355 into the URL so it looks like http://docs.unity3d.com/356/Documentation/Manual/index.html, or use the docs that got installed onto your machine.).

That definitely makes more sense and now after looking at the [history][1] it is clear that they added it in Unity 4.0.0. I suppose there is just no way to build uncompressed asset bundles in Unity 3.5 unless they are built as full scenes. :/ [1]: http://docs.unity3d.com/Documentation/ScriptReference/40_history.html

You can try this method or same with BuildAssetBundle, its hidden in docs now :slight_smile:

 BuildPipeline.BuildAssetBundleExplicitAssetNames (assets, names, path, BuildAssetBundleOptions.CompleteAssets, BuildTarget.StandaloneWindows,  BuildOptions.UncompressedAssetBundle );