Пример #1
0
        protected virtual void Run()
        {
            object @lock = this.Lock;

            lock (@lock)
            {
                this.looper = Looper.ThreadInstance;
                Monitor.Pulse(this.Lock);
            }
            while (!this.IsQuit)
            {
                try
                {
                    this.looper.LoopOnce();
                }
                catch (Exception ex)
                {
                    UnityLogHandler.HandleException("Inside ThreadExecutor named '" + this.Name + "': " + ex.Message, ex);
                    this.Quit();
                }
                GameThread.Sleep(this.sleepMillis);
            }
        }
Пример #2
0
 void Awake()
 {
     UnityLogHandler.RegisterMe();
     DontDestroyOnLoad(this.gameObject);
     DoDownloadingAssets();
 }