> For the complete documentation index, see [llms.txt](https://docs.convai.com/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/unity-plugin-beta-overview/getting-started/setup/add-chat-ui-transcript-ui.md).

# 添加聊天 UI（转录 UI）

## 简介

聊天 UI 是可选的，但它在调试、无需语音测试以及演示基于文本的对话时非常有用。

## 先决条件

* 已安装 Convai SDK
* 已配置 Convai 的场景

## 分步骤

{% stepper %}
{% step %}
**找到 Transcript UI 预制体**

* 在 Project 窗口的搜索栏中，搜索：
  * `TranscriptUI_Chat`
* 确保你的搜索范围包含 **在 Packages 中** 或 **全部**.

<figure><img src="/files/fb7a872a6dd8b9dfc63566658e8f4ed0a9dc0387" alt=""><figcaption></figcaption></figure>

* 或者，你也可以使用包路径：
  * `Packages/com.convai.convai-sdk-for-unity/Prefabs/TranscriptUI/TranscriptUI_Chat.prefab`
    {% endstep %}

{% step %}
**将预制体添加到你的场景中**

* 拖放 **TranscriptUI\_Chat.prefab** 到场景中。
* **预期结果：** UI 会出现在 Hierarchy 中，并在 Game 视图（播放模式）中可见。
  {% endstep %}

{% step %}
**确保存在 Event System**

* 如果你的场景中没有 EventSystem：
  * 在 Hierarchy 中右键 → **UI → Event System**
* **预期结果：** EventSystem 已存在，并且 UI 输入在播放模式下可正常工作。

<figure><img src="/files/aa51e172ef6f127c0449b5be170e62767bb10156" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}

## 故障排查

* **UI 对点击/输入没有响应**
  * 确认场景中恰好只有一个 EventSystem。
* **未找到预制体**
  * 确认该包已正确安装。
  * 确认你的 Project 窗口搜索包含“在 Packages 中”或“全部”。

## 结论

你已将 Transcript UI 添加到场景中，从而启用了文本输入和可读的对话日志。现在你可以通过键盘或麦克风测试对话。

{% hint style="info" %}
**需要帮助？** 如有疑问，请访问 [**Convai 开发者论坛**](https://forum.convai.com/).
{% endhint %}


---

# 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.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/unity-plugin-beta-overview/getting-started/setup/add-chat-ui-transcript-ui.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.
