protected void FireSyncFailureEvent(Exception exception, AsyncOptions options) { if (options.ExecuteCallbackOnMainThread) { // Enqueue the callback so that the Unity main thread dispatcher // can invoke the callback on the main thread. UnityRequestQueue.Instance.ExecuteOnMainThread(() => { FireSyncFailureEvent(exception); }); } else { FireSyncFailureEvent(exception); } } }