Legacy Documentation: Version 2017.1 (Go to current version)
言語English
  • C#
  • JS

Script language

Select your preferred scripting language. All code snippets will be displayed in this language.

Method group is Obsolete

BuildPipeline.BuildAssetBundle

フィードバック

ありがとうございます

この度はドキュメントの品質向上のためにご意見・ご要望をお寄せいただき、誠にありがとうございます。頂いた内容をドキュメントチームで確認し、必要に応じて修正を致します。

閉じる

送信に失敗しました

なんらかのエラーが発生したため送信が出来ませんでした。しばらく経ってから<a>もう一度送信</a>してください。ドキュメントの品質向上のために時間を割いて頂き誠にありがとうございます。

閉じる

キャンセル

マニュアルに切り替える
Obsolete public static function BuildAssetBundle(mainAsset: Object, assets: Object[], pathName: string): bool;
Obsolete public static bool BuildAssetBundle(Object mainAsset, Object[] assets, string pathName);
Obsolete public static function BuildAssetBundle(mainAsset: Object, assets: Object[], pathName: string, out crc: uint, assetBundleOptions: BuildAssetBundleOptions): bool;
Obsolete public static bool BuildAssetBundle(Object mainAsset, Object[] assets, string pathName, out uint crc, BuildAssetBundleOptions assetBundleOptions);
Obsolete public static function BuildAssetBundle(mainAsset: Object, assets: Object[], pathName: string, assetBundleOptions: BuildAssetBundleOptions): bool;
Obsolete public static bool BuildAssetBundle(Object mainAsset, Object[] assets, string pathName, BuildAssetBundleOptions assetBundleOptions);
Obsolete public static function BuildAssetBundle(mainAsset: Object, assets: Object[], pathName: string, out crc: uint): bool;
Obsolete public static bool BuildAssetBundle(Object mainAsset, Object[] assets, string pathName, out uint crc);
Obsolete public static function BuildAssetBundle(mainAsset: Object, assets: Object[], pathName: string, assetBundleOptions: BuildAssetBundleOptions, targetPlatform: BuildTarget): bool;
Obsolete public static bool BuildAssetBundle(Object mainAsset, Object[] assets, string pathName, BuildAssetBundleOptions assetBundleOptions, BuildTarget targetPlatform);
Obsolete public static function BuildAssetBundle(mainAsset: Object, assets: Object[], pathName: string, out crc: uint, assetBundleOptions: BuildAssetBundleOptions, targetPlatform: BuildTarget): bool;
Obsolete public static bool BuildAssetBundle(Object mainAsset, Object[] assets, string pathName, out uint crc, BuildAssetBundleOptions assetBundleOptions, BuildTarget targetPlatform);

パラメーター

mainAsset Lets you specify a specific object that can be conveniently retrieved using 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.

説明

Builds an 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.

The function returns a boolean value which is true if the build succeeded and false otherwise.

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.