private IEnumerator ExchangePanelRoutine(UIPanelBase toHide, UIPanelBase toShow) { if(toHide) { Coroutine toHideCoroutine = toHide.HidePanel(); yield return toHideCoroutine; } if(toShow) { Coroutine toShowCoroutine = toShow.ShowPanel(); yield return toShowCoroutine; } currentActiveRoutine = null; }