1.新建一个工程项目,叫AssetBundleDemo。
2.在工程中创建一个prefab,然后在他的inspector面板下有个AssetBundle选项,一定要写上名字才能打包。
3.新建Editor文件夹创建AssetBundle类。
using UnityEngine;
using System.Collections;
using UnityEditor;
4.工程中要创建对应的AssetBundle文件夹,与上一步打包路径一定要一致。
5.这样就可以在菜单栏上选择BuildBundle按钮进行打包了。
6.打包完之后就可以在项目中进行读取,创建LoadAssetBundle类,绑定到项目中。
using UnityEngine;
using System.Collections;