// 페이지 순서대로 보여줌 IEnumerator Co_ShowTextByPage(TMP_Text textComponent, float waitRange = 0, TextShowMode mode = null) { this._isRunning = true; textComponent.ForceMeshUpdate(); TMP_TextInfo textInfo = textComponent.textInfo; int totalPage = textInfo.pageInfo.Length; int curPage = 1; while (true) { if (curPage > totalPage) { this._isRunning = false; yield break; } textComponent.pageToDisplay = curPage; if (mode != null) { mode(textComponent); } yield return(new WaitForSeconds(waitRange)); curPage += 1; yield return(null); } }
public void ShowTextByPage(float waitRange = 0, TextShowMode mode = null) { if (mode == null) { StartCoroutine(Co_ShowTextByPage(this._textMesh, waitRange, RevealCharacters)); } else { StartCoroutine(Co_ShowTextByPage(this._textMesh, waitRange, mode)); } }