Version: 2017.2

BuildPipeline.BuildAssetBundle

Switch to Manual
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);

Parameters

mainAsset mainAsset позволяет указать конкретный обьект, который удобно получить с помощью AssetBundle.mainAsset.
assets An array of assets to write into the bundle.
pathName The filename where to write the compressed asset bundle.
assetBundleOptions Automatically include dependencies or always include complete assets instead of just the exact referenced objects.
targetPlatform The platform to build the bundle for.
crc The optional crc output parameter can be used to get a CRC checksum for the generated AssetBundle, which can be used to verify content when downloading AssetBundles using WWW.LoadFromCacheOrDownload.

Description

Построить asset bundle (только в Unity Pro).

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.

Функция возвращает логическое значение, которое истинно, если сборка удалась и ложное, если не удалась.

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

See Also: AssetBundle class, WWW.assetBundle.