public void BringToForefront(CanvasGroup panel) { panel.transform.SetAsLastSibling(); panel.DOKill(); panel.DOFade(1.0f, this.FadeInDuration).SetEase(this.FadeEase); }
// Generic UI public void ForcePanelStatus(CanvasGroup panel,bool show) { panel.DOKill(); panel.alpha = show ? 1 : 0; if(show) panel.transform.SetAsLastSibling(); }