IEnumerator _CenterOn() { yield return(new WaitForEndOfFrame()); UICenterOnClick coc = gameObject.GetComponent <UICenterOnClick>(); coc.OnClick(); COC.springStrength = 8; }
IEnumerator _CenterOn() { while (!gameObject.activeInHierarchy) { yield return(new WaitForEndOfFrame()); } UICenterOnClick coc = gameObject.GetComponent <UICenterOnClick>(); coc.OnClick(); COC.springStrength = 8; if (!enablePlayAnim) { yield break; } enablePlayAnim = false; StartCoroutine("PlayShowAnim"); }