protected void ToastUpdate() { if (CurrentToast == null) { if (ToastQueue.Count <= 0) { return; } CurrentToast = ToastQueue.Dequeue(); CurrentToast.UIObject.SetActive(true); CurrentToast.BackgroundColor = new Color(CurrentToast.BackgroundColor.r, CurrentToast.BackgroundColor.g, CurrentToast.BackgroundColor.b, 0); CurrentToast.TitleTextComponent.color = new Color(CurrentToast.TitleTextComponent.color.r, CurrentToast.TitleTextComponent.color.g, CurrentToast.TitleTextComponent.color.b, 0); } else { if (CurrentToast.UpdateLifeTime(Time.deltaTime)) { CurrentToast = null; } } }