// https://gamedev.stackexchange.com/questions/117423/unity-detect-animations-end IEnumerator OnAnimationComplete() { // while (policyAnimator.GetCurrentAnimatorStateInfo(0).normalizedTime < 1.0f && policyAnimator.IsInTransition(0)) // yield return null; yield return(new WaitForSeconds(0.4f)); dialogueViewer.Next(); }
public void Next() { if (typingComplete) { dialogueViewer.Next(); } else { StopCoroutine(dialogueCo); textBox.GetComponent <TextMeshProUGUI>().text = fullMessage; typingComplete = true; } PlayNextSound(); }