Exemple #1
0
    /// <summary>
    /// 释放指定场景所有包和资源
    /// </summary>
    /// <param name="sceneName"></param>
    public void UnLoadAllAssetBundleAndResObjs(string sceneName)
    {
        if (sceneManagers.ContainsKey(sceneName))
        {
            IABSceneManager sceneMgr = sceneManagers[sceneName];

            sceneMgr.DisposeAllBundleAndRes();
        }
    }
Exemple #2
0
 /// <summary>
 /// 释放场景所有AB包和资源
 /// </summary>
 /// <param name="sceneName"></param>
 public void DisposeAllAssetBundleAndRes(string sceneName)
 {
     if (mABManagerDict.ContainsKey(sceneName))
     {
         IABSceneManager sceneManager = mABManagerDict[sceneName];
         sceneManager.DisposeAllBundleAndRes();
         System.GC.Collect();
     }
 }
 //释放一个场景的全部bundle和Object
 public void UnloadAllAssetBundleAndResObjs(string sceneName)
 {
     if (loadManager.ContainsKey(sceneName))
     {
         IABSceneManager tmpManager = loadManager[sceneName];
         tmpManager.DisposeAllBundleAndRes();
         System.GC.Collect();
     }
 }