IEnumerator HandlePanelShowAndHide(NotificationPanel panel) { activePanels++; yield return(panel.Show(activePanels)); yield return(new WaitForSeconds(2f)); yield return(panel.Hide()); Destroy(panel.gameObject); activePanels--; }