private void InitGameCore(UseScriptType _scripttype) { if (!CheckInited(false)) { DLog.LogError("不允许重复初始化GameCore,请检查代码"); return; } SetPath(); GameObject tobj = new GameObject("GameUpdateManager-" + AppName); GameObject.DontDestroyOnLoad(tobj); GManager = tobj.AddComponent <GameUpdateManager>(); tobj = new GameObject("PlayAudioManager-" + AppName); GameObject.DontDestroyOnLoad(tobj); AudioManager = tobj.AddComponent <PlayAudioManager>(); tobj = new GameObject("LoaderManager-" + AppName); GameObject.DontDestroyOnLoad(tobj); LManager = tobj.AddComponent <LoaderManager>(); LManager.Init(AppName, AppPersistentResDataPath, AppStreamingAssetsResDataPath, AppResourcesDataPath); CManager = new CorotineManager(AppName, this); SManager = new ScriptManager(AppName, _scripttype); mIsInited = true; }
protected virtual void Dispose(bool _disposing) { if (mDisposed) { return; } if (_disposing) { DisposeNoGcCode(); } CorotineDic.Clear(); mDisposed = true; IsDispose = true; sInstance = null; }