IEnumerator InAnimationsEnumerator(bool instantAction) { if (UIManager.firstPass) { //We need this WaitForEndOfFrame so that the UIManager gets on the first frame the UIScreenRect size and position yield return(new WaitForEndOfFrame()); } UIAnimator.StopLoopAnimations(GetRectTransform, GetInitialData); ToggleCanvasAndGraphicRaycaster(true); UIAnimator.DoMoveIn(moveIn, GetRectTransform, GetInitialData, instantAction); UIAnimator.DoRotationIn(rotationIn, GetRectTransform, GetInitialData, instantAction); UIAnimator.DoScaleIn(scaleIn, GetRectTransform, GetInitialData, instantAction); UIAnimator.DoFadeIn(fadeIn, GetRectTransform, GetInitialData, instantAction); StartCoroutine("SetSelectedGameObject"); inAnimationsCoroutine = null; }
IEnumerator InAnimationsEnumerator(bool instantAction) { yield return(null); UIAnimator.StopLoopAnimations(GetRectTransform, GetInitialData); ToggleCanvasAndGraphicRaycaster(true); UIAnimator.DoMoveIn(moveIn, GetRectTransform, GetInitialData, instantAction); UIAnimator.DoRotationIn(rotationIn, GetRectTransform, GetInitialData, instantAction); UIAnimator.DoScaleIn(scaleIn, GetRectTransform, GetInitialData, instantAction); UIAnimator.DoFadeIn(fadeIn, GetRectTransform, GetInitialData, instantAction); StartCoroutine("SetSelectedGameObject"); inAnimationsCoroutine = null; //yield return null; yield return(new WaitForSecondsRealtime(GetInAnimationsFinishTime())); if (childButtons != null && childButtons.Length > 0) { for (int i = 0; i < childButtons.Length; i++) { childButtons[i].ResetAnimations(); } } }