IActionMarkupHandler
public interface IActionMarkupHandlerThere are a number of cases where a line's delivery needs to have its timing controlled. For example, PauseEventProcessor adds a small delay between each character, creating a 'typewriter' effect as each letter appears over time.
Another example of a IActionMarkupHandler is an in-line event or animation, such as causing a character to play an animation (and waiting for that animation to complete before displaying the rest of the line).
#Methods
#OnCharacterWillAppear(int, MarkupParseResult, CancellationToken)
public YarnTask OnCharacterWillAppear(int currentCharacterIndex, MarkupParseResult line, CancellationToken cancellationToken);Parameters
currentCharacterIndexintThe zero-based index of the character being displayed.text(unknown)ATMP_Textobject that the line is being displayed in.cancellationTokenCancellationTokenA cancellation token representing whether the
Returns YarnTask: A task that completes when the ActionMarkupHandler has completed presenting this
character. Dialogue presenters will wait until this task is complete
before displaying the remainder of the line.
#OnLineDisplayBegin(MarkupParseResult, TMP_Text)
public void OnLineDisplayBegin(MarkupParseResult line, TMP_Text text);Parameters
- The line being presented.
textTMP_TextATMP_Textobject that the line is being displayed in.
#OnLineDisplayComplete()
PresentCharacter(int, TMP_Text, CancellationToken).public void OnLineDisplayComplete();#OnLineWillDismiss()
public void OnLineWillDismiss();#OnPrepareForLine(MarkupParseResult, TMP_Text)
public void OnPrepareForLine(MarkupParseResult line, TMP_Text text);Parameters
- The line being presented.
textTMP_TextATMP_Textobject that the line is being displayed in.
Generated from Yarn Spinner for Unity 3.3.