private void Awake() { SynchronizationContext.SetSynchronizationContext(ThreadSynchronizationContext.Instance); DontDestroyOnLoad(gameObject); this.codeLoader = CodeLoader.Instance; }
private void Awake() { Instance = this; #if ENABLE_IL2CPP this.CodeMode = CodeMode.ILRuntime; #endif System.AppDomain.CurrentDomain.UnhandledException += (sender, e) => { Log.Error(e.ExceptionObject.ToString()); }; SynchronizationContext.SetSynchronizationContext(ThreadSynchronizationContext.Instance); DontDestroyOnLoad(gameObject); Log.ILog = new UnityLogger(); Options.Instance = new Options(); this.codeLoader = CodeLoader.Instance; }