> For the complete documentation index, see [llms.txt](https://docs.yarnspinner.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.instanttypewriter/yarn.unity.instanttypewriter.runtypewriter.md).

# RunTypewriter(Markup.MarkupParseResult,CancellationToken)

Method in [InstantTypewriter](/api/csharp/yarn.unity/yarn.unity.instanttypewriter.md)

## Summary

Displays the contents of a line over time.

```csharp
public async YarnTask RunTypewriter(Markup.MarkupParseResult line, CancellationToken cancellationToken)
```

## Remarks

This method is called when a dialogue presenter wants to deliver a line's text. The typewriter should present the text to the user; it may take as long as it needs to do so.

If `cancellationToken`'s `System.Threading.CancellationToken.IsCancellationRequested` becomes true, the typewriter effect should end early and present the entire contents of `line`.

## Parameters

| Name                                                                                           | Description                                                            |
| ---------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- |
| [Yarn.Markup.MarkupParseResult](/api/csharp/yarn.markup/yarn.markup.markupparseresult.md) line | The line to display.                                                   |
| `System.Threading.CancellationToken` cancellationToken                                         | A token that indicates that the typewriter effect should be cancelled. |

## Returns

A task that completes when the typewriter effect has finished.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.yarnspinner.dev/api/csharp/yarn.unity/yarn.unity.instanttypewriter/yarn.unity.instanttypewriter.runtypewriter.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
