> 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/scene-metadata.md).

# 场景元数据

查找场景元数据的指南、组件参考和示例——该功能让 Convai 角色感知 Unity 场景中的对象。

场景元数据让 Convai 角色能够感知 Unity 场景中的对象。添加一个 `ConvaiObjectMetadata` 组件到任意 GameObject，以描述它是什么——该静态名称、描述和包含标志会在会话连接时自动发送，并在之后你编辑它们时实时重新同步到每个已连接的角色，无需编写脚本。同一个组件还可以公开可选的跟踪属性，在会话激活期间将对象的实时运行时状态报告给角色。

<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/scene-metadata/how-scene-metadata-works.md">场景元数据的工作原理</a></td></tr><tr><td><strong>场景元数据快速开始</strong><br>注册你的第一个场景对象，并确认它已到达 Convai。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features/scene-metadata/quick-start.md">场景元数据快速开始</a></td></tr><tr><td><strong>场景元数据组件参考</strong><br>用于 <code>ConvaiObjectMetadata</code>的每个 Inspector 字段，包括跟踪属性，以及 <code>ConvaiSceneMetadataCollector</code>.</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features/scene-metadata/component-reference.md">场景元数据组件参考</a></td></tr><tr><td><strong>场景元数据脚本 API</strong><br><code>ConvaiObjectMetadata</code>, <code>ConvaiMetadataRegistry</code>，以及 <code>ConvaiSceneMetadataCollector</code> 公共方法。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features/scene-metadata/scripting-api-reference.md">场景元数据脚本 API</a></td></tr><tr><td><strong>场景元数据使用示例</strong><br>医疗培训、工业安全、博物馆导览、运行时对象排除以及跟踪属性的完整设置。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features/scene-metadata/usage-examples.md">场景元数据使用示例</a></td></tr><tr><td><strong>排查场景元数据问题</strong><br>用于诊断 AI 忽略对象、验证错误、元数据负载为空以及依赖项失败。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/features/scene-metadata/troubleshooting-and-diagnostics.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/scene-metadata.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.
