private void CloseScreen(ScreenController screen, IUIAnimation animation = null) { _navigationStack.Remove(screen); if (animation == null) { GameObject.Destroy(screen.gameObject); return; } animation.AnimateOn(screen.GetComponent <RectTransform>()) .Then(() => GameObject.Destroy(screen.gameObject)); }