# 快速入门

{% hint style="info" %}
使用此资源只需几次点击（导入 -> 添加组件 -> 按播放），但为更好地理解所有内容，请查看以下页面，这样你可以更快并朝正确方向开始。
{% endhint %}

## 1. 实施 Text Animator <a href="#how-to-implement-text-animator" id="how-to-implement-text-animator"></a>

第一步，你需要在项目中实现 Text Animator。

1. **导入 Text Mesh Pro 包** （如果不存在）：\
   在项目管理器中浏览 *（Unity → 窗口/包管理器），* 下载并安装名为 *TextMeshPro 的包。*
2. **导入 “Text Animator” 包**
3. **添加一个 TextAnimator\_TMP 组件** 到与具有 `TextMeshPro 文本` 组件相同的游戏对象上。

检查器应如下所示（*你也可以改用 TextMeshPro 3D 文本组件*):

<div data-full-width="false"><img src="/files/b5a5ec462c03632014b5d15cb1869af5e95a3980" alt=""></div>

{% hint style="success" %}
*完成！我们早就告诉过你这会很快！*\
你的文本现在已准备好应用特效。
{% endhint %}

{% hint style="danger" %}
*附注：如果你已经有外部的打字机组件，请将其移除，否则可能与插件冲突。*

你可以在这里阅读有关受支持第三方资源的更多信息： [集成的插件与对话系统](/text-animator-unity/2.x-zh/ji-cheng/ji-cheng-de-cha-jian-yu-dui-hua-xi-tong.md)
{% endhint %}

## 2. 示例场景

你可以直接从检查器中了解大多数 Text Animator 功能，并查看我们如何设置以及它们的直接效果（当然，本文档也详细包含了所有功能以及额外的自定义和提示——不要错过！）。

{% hint style="info" %}
导入资源时，确保包含 “Example Scenes”，然后从 “00-Welcome!” 开始。
{% endhint %}

<div data-full-width="true"><img src="/files/bbeb50662e289d484861a300ba710b76b31a2853" alt=""></div>

{% hint style="info" %}
当你不再需要示例场景时，可以安全地移除/删除 Example Scenes 文件夹！（并可随时重新导入）
{% endhint %}

## 3. 为你的第一个文本添加动画 <a href="#animating-your-first-texts" id="animating-your-first-texts"></a>

以下是快速为你的第一个文本添加动画的方法。

### 在文本中添加写入效果 <a href="#id-1-writing-effects-in-your-text" id="id-1-writing-effects-in-your-text"></a>

要在文本中添加效果，可以使用类似这样的富文本标签：“`I'm <shake>freezing</shake>`”，其中 “shake” 是内置效果的 ID。&#x20;

* 尝试通过实验以下标签来编写文本： `<wiggle>` `<shake>` `<wave>` `<bounce>`，例如 “`<wiggle>I'm joking</wiggle> hehe now <shake>I'm scared</shake>`”，然后进入 Unity 的播放模式。

{% hint style="success" %}
你的文本会根据你写的效果对字母进行动画处理。
{% endhint %}

### 动态显示字母 <a href="#id-2-showing-letters-dynamically" id="id-2-showing-letters-dynamically"></a>

要动态显示字母（像打字机一样）：

* 添加一个 `TypewriterByCharacter` 组件到相同的游戏对象上。 *（在 Unity 的编辑模式下）*
* 告诉 TextAnimator 你想使用打字机效果。现在，我们先用 **超级简单** 的方式：\
  在 TextAnimator\_TMP 组件上，将 “Typewriter Starts Automatically” 的值设置为 **true**。然后进入播放模式。

{% hint style="success" %}
你的文本现在以打字机方式动态显示。&#x20;
{% endhint %}

***

祝你玩得开心地为文本添加动画！你可以继续下一页，深入了解该资源的所有功能。


---

# 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-zh/huan-ying/kuai-su-ru-men.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.
