/// <summary> /// 释放一个AB包里的单个资源 /// </summary> /// <param name="sceneName"></param> /// <param name="bundleName"></param> /// <param name="resName"></param> public void DisposeResObj(string sceneName, string bundleName, string resName) { if (mABManagerDict.ContainsKey(sceneName)) { IABSceneManager sceneManager = mABManagerDict[sceneName]; sceneManager.DisposeResObj(bundleName, resName); } }
/// <summary> /// 释放指定资源 /// </summary> /// <param name="sceneName">SceneOne</param> /// <param name="bundleName">Load</param> /// <param name="resName">TestTwo</param> /// <returns></returns> public void UnLoadResObj(string sceneName, string bundleName, string resName) { if (sceneManagers.ContainsKey(sceneName)) { IABSceneManager sceneMgr = sceneManagers[sceneName]; sceneMgr.DisposeResObj(bundleName, resName); } }
//释放资源 public void UnLoadResObj(string sceneName, string bundleName, string resName) { if (loadManager.ContainsKey(sceneName)) { IABSceneManager tmpManager = loadManager[sceneName]; tmpManager.DisposeResObj(bundleName, resName); } else { Debug.Log("sceneName ==" + sceneName + "bundleName ==" + bundleName + "is not load"); } }