> 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 编辑器</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>六个循序渐进的场景，从无需代码的 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 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.
