Version: Unity 6.5 Alpha (6000.5)
LanguageEnglish
  • C#

BuildAssetBundleOptions

enumeration

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

Asset Bundle building options.

These flags allow you to configure options when calling BuildPipeline.BuildAssetBundles.

Use AssetBundleOptions to control the compression level of the AssetBundles. By default, AssetBundles are built with full file compression using UnityEngine.CompressionType.Lzma. To compress the AssetBundle data into individual segments, use BuildAssetBundleOptions.ChunkBasedCompression. To avoid compressing the data, use BuildAssetBundleOptions.UncompressedAssetBundle.

Additional resources: UnityEngine.AssetBundle, BuildPipeline.BuildAssetBundles

Properties

Property Description
NoneBuild assetBundle without any special option.
UncompressedAssetBundleDon't compress the data when creating the AssetBundle.
DisableWriteTypeTreeOmits type information from the AssetBundle.
ForceRebuildAssetBundleInitiates a complete rebuild of AssetBundles.
IgnoreTypeTreeChangesIgnore the type tree changes when doing the incremental build check.
AppendHashToAssetBundleNameAppends the hash to the AssetBundle name.
ChunkBasedCompressionUse chunk-based LZ4 compression when creating the AssetBundle.
StrictModeFails the build if any errors are reported during it.
DryRunBuildPerforms a simulated build of AssetBundles without actually creating the files.
DisableLoadAssetByFileNameDisables calling LoadAsset on Asset Bundles using only the file name.
DisableLoadAssetByFileNameWithExtensionPrevents loading assets from Asset Bundles using the file name with its extension.
AssetBundleStripUnityVersionPrevents the Unity Editor version from being recorded in the AssetBundle.
UseContentHashUse the content of the asset bundle to calculate the hash. This feature is always enabled.
StripUnatlasedSpriteCopiesUse to prevent duplicating a texture when it is referenced in multiple bundles. This would primarily happen with particle systems. The new behavior does not duplicate the texture if the sprite does not belong to an atlas. Using this flag is the desired behavior, but is not set by default for backwards compatability reasons.