private static IEnumerator ShowToastsQueueCoroutine() { while (ToastsQueue.Count > 0) { ToastStructure toast = ToastsQueue.Dequeue(); ShowToast(toast); yield return(new WaitForSeconds(toast.DurationInSeconds())); } AndroidManager.toastCoroutine = null; }
private static IEnumerator ShowToastsQueueCoroutine() { while (ToastsQueue.Count > 0) { ToastStructure toast = ToastsQueue.Dequeue(); try { ShowToast(toast); } catch (Exception exception) { Instance.Error("ShowToastsQueueCoroutine", "Failed to send " + toast + "\n" + exception); } yield return(new WaitForSeconds(toast.DurationInSeconds() + 0.5f)); } toastCoroutine = null; }