public IEnumerator Init() { //支付初始化 StorageManager.Inst.Init(); InitDebugCanvas(); #if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IOS) AssetBundleConfig.Inst.UseAssetBundle = true; #endif #if UNITY_EDITOR EventDispatcher.Inst.Init(); #endif Application.targetFrameRate = 60; Screen.sleepTimeout = (int)SleepTimeout.NeverSleep; //初始化需要提前初始化的东西================== URLConfig.Init(); SystemClock.Inst.Init(); SoundPlay.Init(); // AssetBundleManager初始化 yield return(AssetBundleManager.Inst.Init()); Res.Init(); Table.Init(); //检查版本 yield return(AppUpdate.Update()); yield return(ConstUpdate.Update()); // FaceBook SDK初始化 //FBTool.init(); EventDispatcher.TriggerEvent(EventKey.FinishGameInit); SceneLoadManager.Inst.LoadScene(SceneName.StartScene); //返回键侦听 //BackEventManager.Subscribe(WaitingManager.Inst.Back, int.MinValue, "WaitingManager.Back"); //BackEventManager.Subscribe(GuideManager.Inst.Back, -5, "Guide.Back"); BackEventManager.Subscribe(UIManager.Inst.Back, 1, "CK_UIManager.Back"); BackEventManager.Subscribe(BackEventManager.Inst.HandleBackAction, int.MaxValue, "Exit Panel"); }