protected void DisposeNoGcCode() { if (Manifest != null) { Object.DestroyImmediate(Manifest, true); } mBundleTaskList.Clear(); mWaitLoadBundleList.Clear(); RemoveAllAsset(); IsDispose = true; sInstance = null; }
static public bool LoadScene(string _scenename, string pGroupKey = null) { if (IsSceneLoading) { DLog.LogError("The Scene is Loading."); return(false); } _scenename = BaseBundle.DeleteSuffixName(_scenename); string tusname = _scenename.EndsWith(".unity") ? _scenename.Replace(".unity", "") : _scenename; if (SceneManager.GetActiveScene().name.Equals(tusname)) { return(false); } LoaderManager.LoadAsset(_scenename, pGroupKey); SceneManager.LoadScene(tusname, LoadSceneMode.Single); return(true); }
static public bool LoadSceneAsync(string _scenename, System.Action _FinishdCall, string pGroupKey = null) { if (IsSceneLoading) { DLog.LogError("The Scene is Loading."); return(false); } _scenename = BaseBundle.DeleteSuffixName(_scenename); mNowLoadingScene = _scenename.EndsWith(".unity") ? _scenename.Replace(".unity", "") : _scenename; if (SceneManager.GetActiveScene().name.Equals(mNowLoadingScene)) { return(false); } IsSceneLoading = true; mLoadSceneCall = _FinishdCall; LoaderManager.LoadAssetAsync(_scenename, _scenename, LoadedStartScene, pGroupKey); return(true); }