> 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).

# 快速开始

从安装 Convai Unity SDK 到在场景中验证可用的对话式 AI 角色的分步路径。

完成本节后，你的项目将包含一个响应灵敏的 AI 角色：它可以倾听、通过 Convai 处理语音，并实时作出回应。请按顺序浏览各页面——每一步都直接建立在前一步的基础上。

{% hint style="info" %}
**开始之前：** 请确认你的环境符合 [先决条件](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/prerequisites.md) 页面中的要求，包括 Unity <code class="expression">space.vars.unity\_min\_version</code>、所需软件包，以及拥有 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="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/prerequisites.md">前提条件</a></td></tr><tr><td><strong>安装</strong><br>通过 Package Manager 或 Asset Store 将 Convai Unity SDK 添加到项目中。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/installation.md">安装 Convai Unity SDK</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="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/configure-api-key.md">配置 API 密钥</a></td></tr><tr><td><strong>导入并运行示例场景</strong><br>在构建自己的场景前，确认 SDK 能正常运行。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/import-and-run-sample-scenes.md">导入并运行示例场景</a></td></tr><tr><td><strong>多角色示例</strong><br>导入一个共享房间示例场景，其中包含多个角色、交互目标选择和实时转录文本。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features/multi-character-sessions/multi-character-sample.md">多角色示例</a></td></tr><tr><td><strong>场景组件参考</strong><br>了解 ConvaiManager、ConvaiCharacter 和 ConvaiPlayer 的用途，以及它们之间的依赖关系。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/scene-components.md">场景组件参考</a></td></tr><tr><td><strong>构建自定义场景</strong><br>使用 Setup Required Components 命令从头构建 Convai 场景。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/build-a-custom-scene.md">构建自定义场景</a></td></tr><tr><td><strong>验证设置</strong><br>运行场景验证器，确认所需组件齐全，然后再添加功能。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/validate-your-setup.md">验证你的设置</a></td></tr><tr><td><strong>配置对话输入模式</strong><br>选择免提输入或按键通话输入。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/configure-conversation-input-mode.md">配置对话输入模式</a></td></tr><tr><td><strong>配置角色音频</strong><br>调整 NPC 语音音量、空间音频和静音控件。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/configure-character-audio.md">配置角色音频</a></td></tr><tr><td><strong>配置麦克风</strong><br>选择当前使用的麦克风设备，并为 Android、iOS 和 WebGL 设置平台权限。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/configure-microphone.md">配置麦克风</a></td></tr><tr><td><strong>添加聊天界面</strong><br>在场景中显示对话转录文本。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/add-chat-ui.md">添加聊天 UI</a></td></tr><tr><td><strong>添加口型同步</strong><br>让角色的混合形状与语音音频同步驱动。</td><td><a href="https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/add-lip-sync.md">添加口型同步</a></td></tr></tbody></table>

### 后续步骤

设置验证通过后，请探索“功能”部分，为角色添加动作、情绪、长期记忆或视觉能力。

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

在继续构建之前，请阅读“核心概念”，深入了解会话生命周期和事件系统。

{% content-ref url="/pages/b20dffbec401e06e9fe4168f409ab42a87fa327b" %}
[核心概念](https://docs.convai.com/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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
