> 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" %}
**在开始之前：** 请确认你的环境满足以下页面中的要求： [前置条件](/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="/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="/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="/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="/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="/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="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/scene-components.md">场景组件参考</a></td></tr><tr><td><strong>构建自定义场景</strong><br>使用“设置所需组件”命令从零开始构建一个 Convai 场景。</td><td><a href="/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="/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="/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="/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="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/configure-microphone.md">配置麦克风</a></td></tr><tr><td><strong>添加聊天 UI</strong><br>在场景中显示对话转录。</td><td><a href="/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>使角色 BlendShape 与语音音频同步驱动。</td><td><a href="/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" %}
[功能](/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 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.
