12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- using UnityEngine;
- using GFGGame;
- using ET;
- using System.Threading;
- public class GameLauncher : MonoBehaviour
- {
- private void Awake()
- {
- Application.runInBackground = true;
- //ET
- System.AppDomain.CurrentDomain.UnhandledException += (sender, e) =>
- {
- Log.Error(e.ExceptionObject.ToString());
- };
- SynchronizationContext.SetSynchronizationContext(ThreadSynchronizationContext.Instance);
- DontDestroyOnLoad(gameObject);
- ETTask.ExceptionHandler += Log.Error;
- Log.ILog = new UnityLogger();
- Options.Instance = new Options();
- TimeInfo.Instance.TimeZone = 8;
- }
- // Start is called before the first frame update
- void Start()
- {
- LogServerHelperHttp.SendNodeLog((int)LogNode.OnStart);
- LauncherConfig.Init();
- Debug.LogFormat("Application.version {0}", Application.version);
- FGUILauncher.Init();
- LauncherView.Instance.Open();
- LauncherView.Instance.SetDesc("正在初始化...");
- LauncherConfig.GetLauncherCfg();
- }
- }
|