static private void CreatInstance()
 {
     if (sInstance == null)
     {
         UnityEngine.GameObject tobj = new UnityEngine.GameObject("PublicUpdateManager");
         UnityEngine.GameObject.DontDestroyOnLoad(tobj);
         sInstance = tobj.AddComponent <PublicUpdateManager>();
         AppCore.AddPublicMono("PublicUpdateManager", sInstance);
         tobj.SetActive(false);
     }
 }
Exemple #2
0
        override protected void DisposeNoGcCode()
        {
            if (IsSceneLoading)
            {
                DLog.LogError("异步加载场景未完成时,此时进行卸载GameCore操作,可能引起场景错乱.");
            }
            //公用
            PublicUpdateManager.ClearByKey(AppName);
            NetTool.HttpNet.ClearByKey(AppName);
            NetTool.TCPNet.Instance.ClearAppDelgate(AppName);

            for (int i = mScriptInterfaces.Count - 1; i >= 0; i--)
            {
                ScriptInterface.BehaviourInterfaceBase tscript = mScriptInterfaces[i];
                if (tscript == null)
                {
                    continue;
                }
                if (!tscript.mAppName.Equals(AppName))
                {
                    continue;
                }
                tscript.ClearScriptObject();
            }
            mScriptInterfaces.Clear();

            for (int i = mDontDestroyList.Count - 1; i >= 0; i--)
            {
                DestroyImmediate(mDontDestroyList[i]);
            }
            mDontDestroyList.Clear();

            GManager.DestroyManager();
            AudioManager.DestroyManager();
            LManager.DestroyManager();
            CManager.Dispose();
            SManager.Dispose();

            GManager     = null;
            LManager     = null;
            SManager     = null;
            AudioManager = null;
            CManager     = null;
        }
Exemple #3
0
 public void UnZipFileAsync(string _source, string _destination, System.Action <string> _finished, System.Action <float> _progress)
 {
     PublicUpdateManager.UnZipFileAsync(AppName, _source, _destination, _finished, _progress);
 }
Exemple #4
0
 public void DownLoadFileAsync(string _sourceurl, string _destination, bool _IsClear, System.Action <string, string> _finished, System.Action <long, long, float> _progress)
 {
     PublicUpdateManager.DownLoadFileAsync(AppName, _sourceurl, _destination, _IsClear, _finished, _progress);
 }
 override protected void OnDestroy()
 {
     sInstance = null;
     mUpdateList.Clear();
     base.OnDestroy();
 }