> 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 embodiment 模块运行，因此角色必须先安装相应模块，这些动作才能生效。请参阅 [具身化](https://docs.convai.com/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="https://docs.convai.com/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="https://docs.convai.com/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="https://docs.convai.com/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="https://docs.convai.com/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="https://docs.convai.com/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="https://docs.convai.com/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="https://docs.convai.com/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="https://docs.convai.com/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="https://docs.convai.com/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="https://docs.convai.com/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>六个循序渐进的场景，涵盖无需编写代码的 Inspector 配置、脚本化批次注入、与语音同步的时序，以及观察动作。</td><td><a href="https://docs.convai.com/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="https://docs.convai.com/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 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/features/character-actions.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.
