1234567891011121314151617181920212223242526272829303132 |
- using FairyGUI;
- using UnityEngine;
- namespace GFGGame
- {
- public class VersionCheker : MonoBehaviour
- {
- private void Awake()
- {
- var roots = this.gameObject.scene.GetRootGameObjects();
- foreach (var t in roots)
- {
- if (t.name == "FairyGUI" || t.name == "Stage Camera")
- {
- DontDestroyOnLoad(t);
- }
- }
- LauncherConfig.InitScriptCompilation();
- FGUILauncher.Init();
- HealthAdviceView.Open();
- int time = LauncherConfig.netType == LauncherConfig.EnumNetType.TISHEN ? 10 : 1;
- Timers.inst.Add(time, 1, (object param) =>
- {
- HealthAdviceView.Close();
- LauncherView.Instance.Open();
- LauncherController.InitLauncherCfg();
- });
- }
- }
- }
|