Version: 2017.1
Method group is Obsolete

BuildPipeline.BuildAssetBundle

Cambiar al Manual
Obsolete public static bool BuildAssetBundle (Object mainAsset, Object[] assets, string pathName);
Obsolete public static bool BuildAssetBundle (Object mainAsset, Object[] assets, string pathName, out uint crc, BuildAssetBundleOptions assetBundleOptions);
Obsolete public static bool BuildAssetBundle (Object mainAsset, Object[] assets, string pathName, BuildAssetBundleOptions assetBundleOptions);
Obsolete public static bool BuildAssetBundle (Object mainAsset, Object[] assets, string pathName, out uint crc);
Obsolete public static bool BuildAssetBundle (Object mainAsset, Object[] assets, string pathName, BuildAssetBundleOptions assetBundleOptions, BuildTarget targetPlatform);
Obsolete public static bool BuildAssetBundle (Object mainAsset, Object[] assets, string pathName, out uint crc, BuildAssetBundleOptions assetBundleOptions, BuildTarget targetPlatform);

Parámetros

mainAsset Permite especificar un objeto específico que se puede recuperar convenientemente utilizando AssetBundle.mainAsset.
assets Un arreglo de assets para escribir al bundle.
pathName El nombre del archivo donde se escribe el asset bundle comprimido.
assetBundleOptions Incluya automáticamente dependencias o incluya siempre assets completos en lugar de sólo los objetos referenciados exactos.
targetPlatform La plataforma para construir el bundle.
crc El parámetro opcional crc output se puede utilizar para obtener un checksum CRC para el AssetBundle generado, que se puede utilizar para verificar el contenido al descargar AssetBundles utilizando WWW.LoadFromCacheOrDownload.

Descripción

Construye un asset bundle.

Creates a compressed unity3d file that contains a collection of assets. AssetBundles can contain any asset found in the project folder. This lets you stream resource data of any type, fully setup prefabs, textures, meshes, animations, any type of asset shown in the project window.
All paths are relative to the project folder. Like: "Assets / MyTextures / hello.png".


Note that asset bundles built for standalone targets cannot be loaded by applications built for mobile platforms and vice versa. Furthermore, bundles are not compatible between iOS and Android platforms.

La función retorna un valor boolean que es true si la construcción tiene éxito y false de lo contrario.

BuildAssetBundle has been made obsolete. Please use the new AssetBundle build system introduced in 5.0 and check BuildAssetBundles documentation for details.

Mirar también: AssetBundle class, WWW.assetBundle.