> 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/embodiment/body-animation/quick-start.md).

# 身体动画快速入门

将身体动画模块和随附的动画集添加到 Convai 角色，并在 Play 模式下看到空闲和说话动作。

添加 `ConvaiBodyAnimationController` 到一个现有的 Convai 角色，并确认它会使用 SDK 随附的动画内容自行待机和做手势。请在你已经有一个可用的 `ConvaiCharacter` 场景中，并且想在创建自己的片段之前第一次看到身体动画。

***

### 前提条件

* 某个 `ConvaiCharacter` 在你的场景中，已经可以连接并响应——先完成 [验证你的设置](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/validate-your-setup.md) 如果你还没有的话，请先完成。
* 某个 **Humanoid** 带有有效的 `Animator` 在角色上。该组件自身的设置清单会在任何其他检查之前先检查这一点。

***

### 添加身体动画模块

{% stepper %}
{% step %}

#### 选择角色

在 Hierarchy 中，选择 `GameObject` 携带 `ConvaiCharacter` 组件（或承载其 `Animator`).
{% endstep %}

{% step %}

#### 添加身体动画组件

在 Inspector 中，选择 **Add Component**，然后 **Convai > 具身化 > 身体动画**。这会添加 `ConvaiBodyAnimationController` 到角色上。

检查器会以 **未设置** 状态打开，并显示一个清单：人形骨架、Convai 角色、动画内容和移动。移动始终是可选的——没有移动组件的角色仍然会待机、说话、做手势并在原地指向。
{% endstep %}

{% step %}

#### 选择“设置此角色”

选择 **设置此角色** 按钮。这样会分配设置服务在你的项目中找到的动画内容——通常是随附的 `ConvaiBodyAnimationProfile_Female` ——作为一个撤销步骤。如果你保留 **包含移动** 勾选（默认），它还会添加 `ConvaiNavMeshLocomotion`.

Convai 还会自动添加该模块所需的共享基础设施——一个 `EmbodimentContext` 和一个 `StandardRigBinding` ——，自动添加。你无需自己添加这些。由于 **自动创建 Conversation Flow** 默认启用，Convai 会添加一个 [对话流程](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/conversation-flow.md) 控制器，如果角色尚未拥有的话，这样讲话层就有一个可读取的对话状态。
{% endstep %}
{% endstepper %}

{% hint style="info" %}
角色不需要烘焙好的 NavMesh 也能看到待机和说话动作。只有当你通过行走移动让角色前往某处时才需要 NavMesh——参见 [配置移动](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation/configure-locomotion.md).
{% endhint %}

***

### 验证设置

进入播放模式并与角色开始对话。

{% hint style="success" %}
**预期结果：** 角色会在轮次之间自行待机，并在说话时播放随附动作集中的说话手势（`DialogueState.Speaking`).
{% endhint %}

如果你保持启用了移动，并且场景中有烘焙好的 NavMesh，调用 `ConvaiNavMeshLocomotion.MoveTo` 你自己的代码会让角色以同步脚步移动，而不是滑行。

***

### 故障排除

如果角色完全不动，请重新打开检查器——出现回归（集合被清空、骨架绑定被更改）会把它降回到一个 **需要注意** 状态，该状态会命名具体的问题，并带有一个 **修复方法** 按钮，修复操作是机械性的。参见 [排查身体动画](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation/troubleshooting.md) 查看完整的失败模式集合。

***

### 下一步

{% content-ref url="/pages/df549e3c7044c7a74f8fa47f32a2fb316008d8b6" %}
[身体动画工作原理](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation/how-body-animation-works.md)
{% endcontent-ref %}

{% content-ref url="/pages/08270aa7c866eea3e9255dec0db444c2f5165ea2" %}
[构建动画集](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation/build-an-animation-set.md)
{% endcontent-ref %}

{% content-ref url="/pages/13dbbe592147612edba60a45974dc24d1b9f3e61" %}
[播放动作和手势](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation/play-actions-and-gestures.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, and the optional `goal` query parameter:

```
GET https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/body-animation/quick-start.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
