北京海淀网站建设,陈铭生是什么小说,有做翻页相册的网站吗,wordpress图片链接1、打包
在这个界面左边右键#xff0c;CreateNewBundle 将要打包的模型制作成预设体
在下面勾选 选好平台路径#xff0c;点击Build
2、加载AB包
public class ABTest : MonoBehaviour
{// Start is called before the first frame updatevoid Start(){//加载AB包AssetB…1、打包
在这个界面左边右键CreateNewBundle 将要打包的模型制作成预设体
在下面勾选 选好平台路径点击Build
2、加载AB包
public class ABTest : MonoBehaviour
{// Start is called before the first frame updatevoid Start(){//加载AB包AssetBundle ab AssetBundle.LoadFromFile(Application.streamingAssetsPath / model);//加载AB包资源//用这个重载因为Lua不支持泛型GameObject obj ab.LoadAsset(Cube,typeof(GameObject)) as GameObject;Instantiate(obj);obj ab.LoadAsset(Sphere, typeof(GameObject)) as GameObject;Instantiate(obj);}// Update is called once per framevoid Update(){}
}
3、卸载资源
ab.Unload(bool a)函数
参数填true会把已经加载使用也卸载了false只卸载加载的资源。