PausableTypewriter(TextMeshProUGUI,float,Action,Action,Action,Stack<(int position, float duration)>,CoroutineInterruptToken)
Method in Effects
Summary
A coroutine that gradually reveals the text in a TMPro.TextMeshProUGUI
object over time.
Remarks
Essentially identical to Typewriter(TextMeshProUGUI,float,Action,CoroutineInterruptToken) but supports pausing the animation based on pausePositions
values.
This method works by adjusting the value of the text
parameter's TextMeshProUGUI.maxVisibleCharacters
property. This means that word wrapping will not change half-way through the presentation of a word.
Depending on the value of lettersPerSecond
, onCharacterTyped
may be called multiple times per frame.
Due to an internal implementation detail of TextMeshProUGUI, this method will always take at least one frame to execute, regardless of the length of the text
parameter's text.
Parameters
Name | Description |
---|---|
| A TextMeshProUGUI object to reveal the text of |
| The number of letters that should be revealed per second. |
| An |
| An |
| An |
| A stack of character position and pause duration tuples used to pause the effect. Generally created by GetPauseDurationsInsideLine(Markup.MarkupParseResult) |
A CoroutineInterruptToken that can be used to interrupt the coroutine. |