ActionMarkupHandler.OnCharacterWillAppear(int,MarkupParseResult,CancellationToken)

Method in ActionMarkupHandler

Summary

Called repeatedly for each visible character in the line.

public abstract YarnTask OnCharacterWillAppear(int currentCharacterIndex, MarkupParseResult line, CancellationToken cancellationToken);

Remarks

This method is a ActionMarkupHandler object’s main opportunity to take action during line display.

Parameters

NameDescription
int currentCharacterIndexThe zero-based index of the character being displayed.
textA TMPro.TMP_Text object that the line is being displayed in.
CancellationToken cancellationTokenA cancellation token representing whether the
MarkupParseResult line

Returns

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.