> 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/convai-unity-sdk/getting-started.md).

# 快速上手

在本节结束时，你的项目将包含一个响应式 AI 角色，它能够监听、通过 Convai 处理语音，并实时响应。请按顺序阅读这些页面——每一步都直接建立在前一步的基础上。

{% hint style="info" %}
**开始之前：** 请确认你的环境满足以下要求： [先决条件](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/prerequisites.md) 页面上的要求——Unity 版本、所需包，以及带有 API 密钥的 Convai 账户。
{% endhint %}

### 准备工作

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>先决条件</strong><br>安装前的 Unity 版本、所需包和账户要求。</td><td><a href="/pages/61ac8f81d06838cca23d34c8e77b51e38e8affa5">/pages/61ac8f81d06838cca23d34c8e77b51e38e8affa5</a></td></tr><tr><td><strong>安装</strong><br>通过 Package Manager 或 Asset Store 将 Convai Unity SDK 添加到你的项目中。</td><td><a href="/pages/f1f8700aca8f1ecef5696ae3f482c57ceae1064c">/pages/f1f8700aca8f1ecef5696ae3f482c57ceae1064c</a></td></tr></tbody></table>

### 场景设置

<table data-view="cards"><thead><tr><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>配置 API 密钥</strong><br>使用你的账户 API 密钥将项目连接到 Convai。</td><td><a href="/pages/3a95f57092cf5e9062d0377485e90f72b444fbd3">/pages/3a95f57092cf5e9062d0377485e90f72b444fbd3</a></td></tr><tr><td><strong>导入并运行示例场景</strong><br>在构建自己的场景之前，先验证 SDK 是否可正常工作。</td><td><a href="/pages/339e02ef9174c5dbcb43ce3f1d3e39f9753fd9ae">/pages/339e02ef9174c5dbcb43ce3f1d3e39f9753fd9ae</a></td></tr><tr><td><strong>场景组件参考</strong><br>了解 ConvaiManager、ConvaiCharacter 和 ConvaiPlayer 的作用，以及它们之间如何相互依赖。</td><td><a href="/pages/e9f6a66a2fa7574cb77509cf3bffb7e711540c85">/pages/e9f6a66a2fa7574cb77509cf3bffb7e711540c85</a></td></tr><tr><td><strong>构建自定义场景</strong><br>使用“设置所需组件”命令从零开始构建一个 Convai 场景。</td><td><a href="/pages/2c636c36fad522854df1a097c056f4a12f1444ae">/pages/2c636c36fad522854df1a097c056f4a12f1444ae</a></td></tr><tr><td><strong>验证你的设置</strong><br>运行场景验证器，确认在添加功能之前所需组件已存在。</td><td><a href="/pages/21a0b0c11649e9125ef5195167e66c3a2caaadf1">/pages/21a0b0c11649e9125ef5195167e66c3a2caaadf1</a></td></tr><tr><td><strong>配置对话输入模式</strong><br>在免提输入和按住说话输入之间进行选择。</td><td><a href="/pages/26b817b7abe1379d0e73ce3dc01f1e053df39b56">/pages/26b817b7abe1379d0e73ce3dc01f1e053df39b56</a></td></tr><tr><td><strong>配置角色音频</strong><br>调整 NPC 语音音量、空间音频和静音控制。</td><td><a href="/pages/dc31c15bb8798169a403a964c726a9122812a736">/pages/dc31c15bb8798169a403a964c726a9122812a736</a></td></tr><tr><td><strong>配置麦克风</strong><br>选择活动麦克风设备，并为 Android、iOS 和 WebGL 设置平台权限。</td><td><a href="/pages/17d06dd6ce948cddecd226cb498bd300a3508ab9">/pages/17d06dd6ce948cddecd226cb498bd300a3508ab9</a></td></tr><tr><td><strong>添加聊天 UI</strong><br>在你的场景中显示对话转录文本。</td><td><a href="/pages/674d9ab1d00b5f445771b7fa3360d5d499e8dee2">/pages/674d9ab1d00b5f445771b7fa3360d5d499e8dee2</a></td></tr><tr><td><strong>添加口型同步</strong><br>使角色的混合变形与语音音频同步驱动。</td><td><a href="/pages/ed9168a8079f978e6efcf4613ab9296537de8035">/pages/ed9168a8079f978e6efcf4613ab9296537de8035</a></td></tr></tbody></table>

### 下一步

在验证完设置后，浏览“功能”部分，为你的角色添加 Actions、Emotion、Long-Term Memory 或 Vision。

{% content-ref url="/pages/8c561f7c198c46628ed5818040fdaa9af3397caf" %}
[功能](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features.md)
{% endcontent-ref %}

在进一步构建之前，先查看“核心概念”，以更深入地理解会话生命周期和事件系统。

{% content-ref url="/pages/b20dffbec401e06e9fe4168f409ab42a87fa327b" %}
[核心概念](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/core-concepts.md)
{% endcontent-ref %}


---

# 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/convai-unity-sdk/getting-started.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.
