Example #1
0
 public void DebugAllAssetBundle(string sceneName)
 {
     if (dicLoadManager.ContainsKey(sceneName))
     {
         IABSceneManager tmpManager = dicLoadManager[sceneName];
         tmpManager.DebugAllAsset();
     }
 }
Example #2
0
 /// <summary>
 /// 释放整个场景的obj
 /// </summary>
 /// <param name="sceneName"></param>
 /// <param name="bundleName"></param>
 /// <param name="resName"></param>
 public void UnLoadAllObjs(string sceneName, string bundleName, string resName)
 {
     if (dicLoadManager.ContainsKey(sceneName))
     {
         IABSceneManager tmpManager = dicLoadManager[sceneName];
         tmpManager.DisposeAllObj();
     }
 }
Example #3
0
 /// <summary>
 /// 第二步 读取配置文件
 /// </summary>
 /// <param name="sceneName"></param>
 public void ReadConfiger(string sceneName)
 {
     if (!dicLoadManager.ContainsKey(sceneName))
     {
         IABSceneManager tmpManager = new IABSceneManager(sceneName);
         tmpManager.ReadConfiger(sceneName);
         dicLoadManager.Add(sceneName, tmpManager);
     }
 }
Example #4
0
 /// <summary>
 /// 释放一个场景所有的bundle包和obj
 /// </summary>
 /// <param name="sceneName"></param>
 /// <param name="bundleName"></param>
 /// <param name="resName"></param>
 public void UnLoadAllBundleAndResObjs(string sceneName, string bundleName, string resName)
 {
     if (dicLoadManager.ContainsKey(sceneName))
     {
         IABSceneManager tmpManager = dicLoadManager[sceneName];
         tmpManager.DisposeAllBundleAndRes();
         System.GC.Collect();
     }
 }
Example #5
0
 /// <summary>
 /// 释放一个bundle
 /// </summary>
 /// <param name="sceneName"></param>
 /// <param name="bundleName"></param>
 /// <param name="resName"></param>
 public void UnLoadAssetBundle(string sceneName, string bundleName, string resName)
 {
     Debug.Log(sceneName);
     if (dicLoadManager.ContainsKey(sceneName))
     {
         IABSceneManager tmpManager = dicLoadManager[sceneName];
         tmpManager.DisposeBundle(bundleName);
     }
 }
Example #6
0
        /// <summary>
        /// 加载
        /// </summary>
        /// <param name="sceneName"></param>
        /// <param name="bundleName"></param>
        /// <param name="progress"></param>
        public void LoadAsset(string sceneName, string bundleName, LoadProgrecess progress)
        {
            if (!dicLoadManager.ContainsKey(sceneName))
            {
                ReadConfiger(sceneName);
            }

            IABSceneManager tmpManager = dicLoadManager[sceneName];

            tmpManager.LoadAsset(bundleName, progress, LoadCallBack);
        }
Example #7
0
 private void LoadCallBack(string sceneName, string bundleName)
 {
     if (dicLoadManager.ContainsKey(sceneName))
     {
         IABSceneManager tmpManager = dicLoadManager[sceneName];
         StartCoroutine(tmpManager.LoadAssetSys(bundleName));
     }
     else
     {
         Debug.Log("bundle name is not  contain ==" + sceneName);
     }
 }
Example #8
0
 public UnityEngine.Object[] GetMutResources(string sceneName, string bundleName, string resName)
 {
     if (dicLoadManager.ContainsKey(sceneName))
     {
         IABSceneManager tmpManager = dicLoadManager[sceneName];
         return(tmpManager.GetMutResources(bundleName, resName));
     }
     else
     {
         Debug.Log("Is not  load ==" + sceneName + "/" + bundleName);
         return(null);
     }
 }
Example #9
0
        /// <summary>
        /// 是否已经加载
        /// </summary>
        /// <param name="sceneName"></param>
        /// <param name="bundleName"></param>
        /// <returns></returns>
        public bool IsLoadingBundle(string sceneName, string bundleName)
        {
            bool tmpBool = dicLoadManager.ContainsKey(sceneName);

            if (tmpBool)
            {
                IABSceneManager tmpManager = dicLoadManager[sceneName];

                return(tmpManager.IsLoadingAssetBundle(bundleName));
            }

            return(false);
        }