Unity AssetBundle designated AssetLabel packaged AssetBundleBuild

Before the introduction of a packaged way (here called a way), it seems to have for a long time, before the presentation also looked at the blog has found a problem.

A way to have the entire project, all played AssetLable items packaged, that is to say how many labels carry a number bundle. So the question is if the project is too large, one-time hit all the bundle is bound to waste a lot of time that the question is,

Is there any way you can play only part of the bundle, the answer is yes:

We describe a class here: AssetBundleBuild. First remember it, do not control. Then we look at the following methods:

BuildPipeline.BuildAssetBundles (); which is where such a heavy load (one line below), the other has not before the blog said
BuildPipeline.BuildAssetBundles (string, AssetBundleBuild [], BuildAssetBundleOptions, BuildTarget);

Note that this AssetBundleBuild Well ? Ah, it can help us achieve our goals

AssetBundleBuild abBuild = new AssetBundleBuild();

 abBuild.assetBundleName = target; // is the goal we want AssetLabel
  // names of all the resources of this package;
 abBuild.assetNames = getAllFiles (path)

Note here assetsNames the need for extension, and its path from the Asset start, such as:

Assets/Game/BBBB/XXXX/LLLL/HHHH/BXLH.png

Wrong path will alert you:. No AssetBundle has been set for this build leading play no package

Before the blog: https: //www.cnblogs.com/BXLH/p/10496265.html

 

Guess you like

Origin www.cnblogs.com/BXLH/p/11648852.html