# 故障排除

<details>

<summary>当我设置文本时，在显示新文本之前我会看到上一帧的旧文本</summary>

这可能是因为文本被设置为 TMPro/UITK，而不是直接设置为 Text Animator。&#x20;

**解决方案**：请查看 [设置文本](/text-animator-unity/3.x-zh/xiao-guo/she-zhi-wen-ben.md) 页面以了解最佳实践和 [动态显示和隐藏字母](/text-animator-unity/3.x-zh/da-zi-ji/dong-tai-xian-shi-he-yin-cang-zi-mu.md)!

**解决方法**：如果问题仍然存在，请确保在显示新文本之前清除文本（例如在禁用时）。

</details>

<details>

<summary>我升级了 Unity 版本（2022.3 -> Unity 6.3），Text Animator 出现了一些错误</summary>

如果在同一项目中从 Unity 2022.3 升级到 Unity 6.3 并且项目中仍保留 Text Animator，可能会出现一些错误。我们实际上为不同的 Unity 版本提供不同版本的包，因此你也需要切换 Text Animator 的版本。

**解决方案**：只需移除该包（不是效果/数据！仅移除脚本），然后从包管理器重新导入即可。

</details>

<details>

<summary>我将资源从 2.X 更新到 3.X 出现了一些错误</summary>

是的！不幸的是这是预料之中的（正如我们在博客文章、公告中所写，并在资源商店中做了重大升级）。

**解决方案** （有点）：由于 3.0 版本带来了一些重要更改，我们确实建议你在此项目中保持使用 2.X 版本，仅在新项目中切换到 Text Animator 3.0。如果你在其上编写了自定义集成/脚本，请查看 [从 2.X 升级到 3.X](/text-animator-unity/3.x-zh/qi-ta/geng-xin-ri-zhi/cong-2.x-sheng-ji-dao-3.x.md) 以获取相关信息！

</details>

<details>

<summary>打字机效果会瞬间显示全部文本</summary>

**解决方案**：请确保从检查器/UI Builder 中为时序分配可脚本化对象（scriptable object）！ [动态显示和隐藏字母](/text-animator-unity/3.x-zh/da-zi-ji/dong-tai-xian-shi-he-yin-cang-zi-mu.md)

</details>

### 常见错误

<details>

<summary>NullReferenceException：对象引用未设置为对象的实例 TMPro.TMP_Settings.get_defaultStyleSheet</summary>

请确保已正确导入 TextMeshPro 并初始化“必需项”。在此处阅读更多信息 [设置文本](/text-animator-unity/3.x-zh/xiao-guo/she-zhi-wen-ben.md)

</details>

### 警告

<details>

<summary>Camera Main Camera 不包含额外的相机数据组件。打开该游戏对象的检查器以添加额外的相机数据。</summary>

如果你安装了 URP 或类似包但示例场景没有，该情况会在示例场景中出现。这不是问题！按照警告说明添加额外数据，资源仍然可以正常工作！

</details>

### 已知问题

如果你遇到其他任何问题，请随时在此联系我们！我们会尽快修复：

{% embed url="<https://www.textanimatorforgames.com/support>" %}


---

# 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/3.x-zh/qi-ta/gu-zhang-pai-chu.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.
