> For the complete documentation index, see [llms.txt](https://docs.febucci.com/text-animator-unity/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.febucci.com/text-animator-unity/3.x-zh/ji-cheng/yi-ji-cheng-de-cha-jian-yu-dui-hua-xi-tong/yarn-spinner.md).

# Yarn Spinner

Yarn Spinner 是一个强大的工具，允许你这样编写对话：

```
-> 发生了什么事？ <<once>>
    守卫：王国正被围攻！
-> 我可以把马停在哪里？ <<once if $has_horse>>
    守卫：在酒馆那边。
-> 今天天气真好！
    守卫：嗯。
-> 我该走了。
    守卫：请走吧。
```

它还有一个可视化调试器，能直接在 Unity 中工作，并提供许多其他很棒的功能。&#x20;

{% embed url="<https://www.yarnspinner.dev/>" %}

***

### 集成步骤

要集成 Yarn Spinner 3，你需要将 Text Animator 的打字机组件替换为他们为此集成专门制作的组件。

{% hint style="success" %}
你将能够使用所有 Text Animator 的功能（包括打字机等待时间等），同时 ***也*** 拥有 Yarn Spinner 的任意等待以及其他特定功能。
{% endhint %}

你可以在这里阅读更多：

{% embed url="<https://docs.yarnspinner.dev/3.1/yarn-spinner-for-unity/unity-add-ons/text-animator>" %}

{% hint style="info" %}
请让我们知道它是否按您预期的方式工作，或者您是否希望添加任何新功能或改进！干杯！
{% endhint %}

***

{% hint style="warning" %}
如果你使用的是较旧版本的 Yarn Spinner，请参考他们的文档以了解集成如何工作！（Yarn Spinner 同时支持 TAnim 2.X 和 3.X，太好了！）
{% endhint %}
