Esempio n. 1
0
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.A))
     {
         AssetBundleMgr.GetInstance().DisposeAllAssets(_SceneName);
     }
 }
Esempio n. 2
0
 //测试销毁资源
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.A))
     {
         Debug.Log(GetType() + " 测试销毁资源");
         AssetBundleMgr.GetInstance().DisposeAllAssets(_ScenesName);
     }
 }
Esempio n. 3
0
        private void LoadAllABComplete(string abName)
        {
            UnityEngine.Object tmpObj = null;

            tmpObj = (UnityEngine.Object)AssetBundleMgr.GetInstance().LoadAsset(_SceneName, _AssetBundleName, _AssetName, false);
            Debug.Log(tmpObj);
            if (tmpObj != null)
            {
                Instantiate(tmpObj);
            }
        }
Esempio n. 4
0
        //回调函数: 所有的AB包都已经加载完毕了
        private void LoadAllABComplete(string abName)
        {
            Debug.Log(GetType() + "所有的AB包都已经加载完毕了");
            UnityEngine.Object tmpObj = null;

            //提取资源
            tmpObj = (UnityEngine.Object)AssetBundleMgr.GetInstance().LoadAsset(_ScenesName, _AssetBundelName, _AssetName, false);
            if (tmpObj != null)
            {
                Instantiate(tmpObj);
            }
        }
Esempio n. 5
0
 private void Start()
 {
     StartCoroutine(AssetBundleMgr.GetInstance().LoadAssetBundlePack(_SceneName, _AssetBundleName, LoadAllABComplete));
 }
Esempio n. 6
0
 private void Start()
 {
     Debug.Log(GetType() + "开始'ABFW'框架测试 ");
     //调用AB包(连锁智能调用AB包【集合】)
     StartCoroutine(AssetBundleMgr.GetInstance().LoadAssetBundlePack(_ScenesName, _AssetBundelName, LoadAllABComplete));
 }