AssetBundle Workflow
To get started with AssetBundles, follow these steps. More detailed information about each piece of the workflow can be found in the other pages in this section of documentation.
在使用AssetBundles,请遵循以下步骤。更多关于工作流其他部分的信息可以从本文档的其他页面找到。
1.Select the asset you want to assign to a bundle from your Project View
从视图中选择你需要分配到bundle的资源
2.Examine the object in the inspector
在inspector中检查对象
3.At the bottom of the inspector you should see a section to assign AssetBundles and Variants:
在inspector的底部,你可以发现一部分是用来分配AssetBundles和其变量。
4.The left-hand drop down assigns the AssetBundle while the right-hand drop down assigns the variant
左边下拉列表分配AssetBundle 右边下拉列表分配变量
5.Click the left-hand drop down where it says “None” to reveal the currently registered AssetBundle names
点击左下拉列表出现None,用来显示当前AssetsBundle的名字
6.Click “New…” to create a new AssetBundle
点击new 来创建一个新的AssetBundle
7.Type in the desired AssetBundle name. Note that AssetBundle names do support a type of folder structure depending on what you type. To add sub folders, separate folder names by a “/”. For example: AssetBundle name “environment/forest” will create a bundle named forest under an environment sub folder
输入所需要的AssetBundle名字,需要注意的是 AssetBundle名字是支持一种类型的文件夹,这取决于你起的名字。添加子文件夹,用/分隔文件夹名字,举一个例子,“environment/forest” AssetBundle名字 可以创建一个名字为forest的包在environment的子文件中
8.Once you’ve selected or created an AssetBundle name, you can repeat this process for the right hand drop down to assign or create a Variant name, if you desire. Variant names are not required to build the AssetBundles
当你选择或创建一个AssetBudle名称时,你可以通过右下来列表来创建一个变量名称,构建AssetBundles也是可以不需要变体名称的