public TestZone(Action <Exception> exceptionHandler) { _exceptionHandler = exceptionHandler; var mainThreadId = Thread.CurrentThread.ManagedThreadId; _dispatcher = new TimerDispatcher(mainThreadId, exceptionHandler); Zone.Current = this; }
private void Awake() { if (_dispatcher != null) { Destroy(gameObject); return; } var unityThreadId = Thread.CurrentThread.ManagedThreadId; _dispatcher = new TimerDispatcher(unityThreadId, HandleUncaughtException); Zone.Current = this; }