# Yarn Spinner

[Yarn Spinner (open source): website](https://yarnspinner.dev/).

### Yarn Spinner 2.X & Text Animator for Unity

You can integrate Yarn Spinner 2.X in two main ways.

* The first one is to use TextAnimator's typewriter (so, disabling Yarn Spinner's one), which is preferable in case you want to use all Text Animator's features like pausing the typewriter, waiting for player input and more.
* * In the "Line View" script, disable "Use Typewriter" and "Use Fade Effect".
  * Add the components TextAnimator\_TMP and TypewriterByCharacter to your dialogue text, as shown in the [](https://docs.febucci.com/text-animator-unity/2.x/integrations/integrated-plugins-and-dialogues-systems "mention").
  * *P.S. Based on how you setup your canvas, the text might flicker for one frame. If that happens, be sure to call "tmproText.ClearMesh(true)" before showing a new dialogue line, and once the canvas disappears. For example, as following if you have a "Continue" button:*
  * ![tmpro clearmesh event](https://541806160-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJE1tNTWPRG3py6Cs3USD%2Fuploads%2FmI4FP2TCLaI1AGjs6qrz%2Ftmpro_clearmesh_event.png?alt=media)
* The second way is to keep using Yarn Spinner's typewriter (but you wouldn't be able to use Text Animator's typewriting features).
* * In the "Line View" script, set "Use Fade Effect" and "Use Typewriter Effect" to true.
  * Add a TextAnimator\_TMP component to your dialogue text, and be sure to disable "Typewriter Starts Automatically".

### Yarn Spinner 1.X with Text Animator Unity

* Use TextMeshPro instead of Unity's built-in Text
* "DialogueUI" component, set "text speed" to 0.
* "DialogueUI" component, set the "OnLineUpdate" event with TextMeshPro's text.
* ![textanimator integration yarnspinner lineupdate](https://541806160-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJE1tNTWPRG3py6Cs3USD%2Fuploads%2F7GK2ca6dnIpfILUnHYxp%2Ftextanimator%20integration%20yarnspinner%20lineupdate.png?alt=media)
* Add the components TextAnimator\_TMP and TypewriterByCharacter to your dialogue text, as shown in the [](https://docs.febucci.com/text-animator-unity/2.x/integrations/integrated-plugins-and-dialogues-systems "mention").


---

# Agent Instructions: 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.febucci.com/text-animator-unity/2.x/integrations/integrated-plugins-and-dialogues-systems/yarn-spinner.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.
