public void DebugAllAssetBundle(string sceneName) { if (dicLoadManager.ContainsKey(sceneName)) { IABSceneManager tmpManager = dicLoadManager[sceneName]; tmpManager.DebugAllAsset(); } }
/// <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(); } }
/// <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); } }
/// <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(); } }
/// <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); } }
/// <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); }
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); } }
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); } }
/// <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); }