> 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/features/character-actions.md).

# 角色动作

查找 Convai 角色动作在 Unity 中的 Actions Editor、执行器参考、调度器配置、脚本 API 和使用指南。

角色动作使 Convai 角色能够以场景内行为响应玩家所说的话——走向目标、进行眼神接触、做一个手势，或运行你自己的游戏逻辑代码。Convai 会识别要运行哪个动作以及目标是什么；在 Actions Editor 中，你可以添加并配置 21 个内置执行器来执行它，或接入你自己的执行器。本节涵盖从你的第一个动作到完整脚本 API 的所有内容。

几个内置执行器通过 Gaze 和 Body Animation 具身模块运行，因此角色在这些动作生效前需要先安装对应模块——请参见 [具身化](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/embodiment.md).

<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>了解管线、关键概念、所需组件和内置执行器。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features/character-actions/how-character-actions-work.md">角色动作的工作原理</a></td></tr><tr><td><strong>角色动作快速开始</strong><br>从 Actions Editor 的入门目录中向你的 NPC 添加一个现成动作——无需脚本。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features/character-actions/quick-start.md">角色动作快速入门</a></td></tr><tr><td><strong>Actions Editor</strong><br>Actions Editor 窗口参考：Add Action 目录，以及一键配置执行器。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features/character-actions/actions-editor.md">动作编辑器</a></td></tr><tr><td><strong>配置角色动作</strong><br>完整参考： <code>ConvaiActionConfigSource</code> ——动作定义、目标以及连接时覆盖项。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features/character-actions/configuring-actions.md">配置角色动作</a></td></tr><tr><td><strong>在运行时更新角色动作</strong><br>应用 <code>ConvaiActionConfigPatch</code> 在会话处于活动状态时，对动作、对象、角色和注意力进行更新，并由 Convai 的确认消息确认。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features/character-actions/update-actions-at-runtime.md">在运行时更新角色动作</a></td></tr><tr><td><strong>动作执行器</strong><br>所有 21 个执行器组件的完整参考，包含 Inspector 字段表。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features/character-actions/action-executors.md">动作执行器</a></td></tr><tr><td><strong>调度器与批次策略</strong><br>配置如何 <code>ConvaiActionDispatcher</code> 处理并发批次和步骤失败。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features/character-actions/dispatcher-and-batch-policies.md">分发器和批处理策略</a></td></tr><tr><td><strong>编写自定义动作执行器</strong><br>实现 <code>IConvaiActionExecutor</code> 为任何动作创建项目特定的行为。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features/character-actions/writing-custom-executors.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/character-actions/attention-and-reference-grounding.md">动作目标解析的工作方式</a></td></tr><tr><td><strong>角色动作脚本参考</strong><br>适用于所有动作系统类型、事件、枚举和组件的完整公共 API。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features/character-actions/actions-scripting-reference.md">角色动作脚本参考</a></td></tr><tr><td><strong>角色动作示例</strong><br>6 个循序渐进的场景，从无需代码的 Inspector 设置，到脚本化批量注入、与语音同步的时序，以及观察动作。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features/character-actions/usage-examples.md">角色动作示例</a></td></tr><tr><td><strong>排查角色动作问题</strong><br>使用 Action Troubleshooter 和症状/原因/修复参考来诊断动作管线问题。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features/character-actions/debugging-and-troubleshooting.md">排查角色动作问题</a></td></tr></tbody></table>


---

# 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/features/character-actions.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.
