> 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/emotion/quick-start.md). Agents can also search and read this documentation through its [MCP server](https://docs.convai.com/api-docs/~gitbook/mcp).

# 情绪快速入门

将 Convai Emotion 组件添加到角色，运行其设置检查清单，并在 Play 模式下看到面部对对话作出反应。

添加 `ConvaiEmotionController` 到现有的 Convai 角色，为其指定角色类型，并在播放模式下确认其面部会对对话做出反应。当场景中已有可正常运行的 `ConvaiCharacter` ，并且想在调整任何设置之前先查看 Emotion 的运行效果时，请使用此页面。

***

### 前提条件

* 场景中已有一个 `ConvaiCharacter` ，且它已能连接并响应——如果尚未完成，请先完成 [验证设置](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started/validate-your-setup.md) 。
* 带有 Blend Shape、且遵循受支持命名规范（ARKit、Reallusion CC3、Reallusion CC4 Extended 或 MetaHuman）的蒙皮面部网格。对于其他命名规范，请先指定 `CustomRigConventionMap` ——请参阅 [角色绑定设置](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/character-rig-setup.md).

{% hint style="info" %}
Emotion 不需要 `ConvaiEmotionProfile` 资产。仅添加此组件时，它会使用 SDK 的内置默认值运行；按照下方步骤进行设置，可以为角色赋予初始个性，而不是让所有设置都保持默认值。
{% endhint %}

***

### 添加并设置 Emotion 组件

{% stepper %}
{% step %}

#### 选择角色

在 Hierarchy 中，选择附带 `GameObject` 的对象，该对象上有 `ConvaiCharacter` 组件。
{% endstep %}

{% step %}

#### 添加 Emotion 组件

在 Inspector 中，选择 **Add Component**，然后选择 **Convai > Embodiment > Emotion**。这会添加 `ConvaiEmotionController` 赋予角色。

Convai 还会添加该模块所需的基础设施——一个 `EmbodimentContext`、一个 `StandardRigBinding`以及内部的 `MoodCommandHandlerAdapter` 它能让 Convai 的响应自动设置该角色的心情。你无需自行添加这些内容。
{% endstep %}

{% step %}

#### 阅读设置检查清单

该 `ConvaiEmotionController` 检查器会打开一个检查清单： **角色**, **面部**, **面部绑定**，以及 **个性**。每一行都会报告检测结果；无法解析的行会指出需要进行的修复。
{% endstep %}

{% step %}

#### 选择一种角色类型并运行设置

从四种类型中选择一种 **角色类型** 按钮——沉稳、温暖、活力四射或内敛——然后选择 **设置情绪**。这会在角色的预制件旁创建一个人格资源，并将其分配给 **人格** 字段，并报告检测结果。无需进行其他操作。
{% endstep %}
{% endstepper %}

***

### 验证设置

进入播放模式并与角色交谈。随着 Convai 的回复到达，检视面板中的 **实时** 部分会更新： **感受** 显示当前情绪， **强度** 显示其强烈程度，而 **心境** 显示角色在轮次之间的静息心境。

{% hint style="success" %}
**预期结果：** 随着对话的进行，角色的表情会发生变化，然后在轮次之间逐渐恢复到所选角色类型的静息心境。在「温暖」或「活力」模式下，即使角色没有说话，面部也应明显显得更友善。
{% endhint %}

若要在不与角色交谈的情况下预览表情，请使用 Inspector 的 **实时** 部分：选择一种情绪，设置强度，然后选择 **试试看**；选择 **停止** 以解除该表情。

***

### 工作原理

与角色交谈时，Convai 会随回复发送情绪信号。 `ConvaiEmotionController` 会根据分类体系解析该信号，对其强度进行平滑处理，并通过共享的面部合成器将其叠加到角色面部。有关完整流程，请参阅 [情绪系统的工作原理](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/emotion/how-the-emotion-system-works.md).

***

### 故障排查

如果检查清单显示 **面部绑定** 未解决，或者设置完成后面部没有任何变化，请参阅 [情绪问题排查](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/emotion/troubleshooting-and-diagnostics.md).

***

### 后续步骤

{% content-ref url="/pages/a169ddd3c944e6f42f2701922ad7b55a03ac789a" %}
[情绪系统的工作原理](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/emotion/how-the-emotion-system-works.md)
{% endcontent-ref %}

{% content-ref url="/pages/f5a3aaba473b4dfb20969b46c9a49bc4b176f223" %}
[心情](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/emotion/moods.md)
{% endcontent-ref %}

{% content-ref url="/pages/5a9247365092d958f2d539ae98bdfe69f72df091" %}
[Emotion 配置文件](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment/emotion/emotion-profile.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/embodiment/emotion/quick-start.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.
