> 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-unreal-engine-plugin/features/dynamic-context.md).

# 动态上下文

查找通过 Blueprint 节点向 Convai 角色推送实时状态和事件，并验证关卡中具备上下文感知响应的指南。

动态上下文可以让 Convai 角色了解你关卡中此刻正在发生什么——受训者生命值、当前区域、装备状态、警报以及叙事节点。你通过 Blueprint 中的 `Convai|动态上下文` 节点族中的 `Convai Chatbot` 组件（`UConvaiChatbotComponent`).

当某个事实在游戏过程中发生变化，并且角色应当能够在对话中引用它时，请使用动态上下文。使用 `设置上下文状态` 用于可替换的当前状态（例如， `生命值` 是 `50`）。使用 `添加上下文事件` 用于一次性时刻（例如， `4区触发警报`).

<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-unreal-engine-plugin/features/dynamic-context/how-dynamic-context-works.md">动态上下文的工作原理</a></td></tr><tr><td><strong>动态上下文快速上手</strong><br>在 Blueprint 中推送你的第一个状态和事件，然后验证角色是否可以使用更新后的上下文。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/dynamic-context/dynamic-context-quick-start.md">动态上下文快速开始</a></td></tr><tr><td><strong>连接时的静态上下文</strong><br>了解哪些数据在会话开始时是固定的，以及它与实时动态上下文有何不同。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/dynamic-context/static-context-at-connection-time.md">连接时的静态上下文</a></td></tr><tr><td><strong>同步行为和时机</strong><br>了解更新何时会刷新、离线排队如何工作，以及何时使用立即刷新。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/dynamic-context/sync-behavior-and-timing.md">同步行为与时序</a></td></tr><tr><td><strong>动态上下文 Blueprint 参考</strong><br>每个 `Convai|DynamicContext` 节点、属性、枚举和传输字段的参考。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/dynamic-context/dynamic-context-blueprint-reference.md">动态上下文 Blueprint 参考</a></td></tr><tr><td><strong>动态上下文使用示例</strong><br>用于健康追踪、区域变化、叙事事件和会话重置的 Blueprint 配方。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/dynamic-context/dynamic-context-usage-examples.md">动态上下文使用示例</a></td></tr><tr><td><strong>动态上下文故障排查</strong><br>修复到达过晚、触发意外响应，或在刷新后看似被忽略的更新。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/dynamic-context/troubleshoot-dynamic-context.md">排查动态上下文问题</a></td></tr></tbody></table>

### 推荐阅读顺序

1. [动态上下文的工作方式](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/dynamic-context/how-dynamic-context-works.md) ——了解状态和事件模型。
2. [动态上下文快速上手](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/dynamic-context/dynamic-context-quick-start.md) ——推送并验证你的第一次更新。
3. [连接时的静态上下文](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/dynamic-context/static-context-at-connection-time.md) ——将会话开始时的事实与实时更新区分开来。
4. [同步行为和时机](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/dynamic-context/sync-behavior-and-timing.md) ——调整刷新、排队以及立即同步行为。
5. 参考、示例和故障排除页面——当你需要精确的节点行为、应用模式或修复方法时使用。

{% content-ref url="/pages/8ef7dcd046dad07f4afcb544f96d3beda6feb0ad" %}
[动态上下文的工作原理](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/dynamic-context/how-dynamic-context-works.md)
{% endcontent-ref %}

{% content-ref url="/pages/602e67296ec3ed2b843879adb48efa844ab06ec3" %}
[动态上下文快速开始](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unreal-engine-plugin/features/dynamic-context/dynamic-context-quick-start.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-unreal-engine-plugin/features/dynamic-context.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.
