Example #1
0
        private void Awake()
        {
            SynchronizationContext.SetSynchronizationContext(ThreadSynchronizationContext.Instance);

            DontDestroyOnLoad(gameObject);

            this.codeLoader = CodeLoader.Instance;
        }
Example #2
0
        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;
        }