> 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 场景中的对象。添加一个 `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="/pages/df7e8b09abcd66c8464d199cbe2d609cb6a389a8">/pages/df7e8b09abcd66c8464d199cbe2d609cb6a389a8</a></td></tr><tr><td><strong>场景元数据快速入门</strong><br>注册你的第一个场景对象，并确认它已送达 Convai。</td><td><a href="/pages/6870c01843dd57c3ac7ecac3bfb3a6790f115e1b">/pages/6870c01843dd57c3ac7ecac3bfb3a6790f115e1b</a></td></tr><tr><td><strong>场景元数据组件参考</strong><br>针对以下内容的每个 Inspector 字段： <code>ConvaiObjectMetadata</code>，包括跟踪属性，以及 <code>ConvaiSceneMetadataCollector</code>.</td><td><a href="/pages/b55fe13afe8f10f3ca27eec09be22c5bd975a884">/pages/b55fe13afe8f10f3ca27eec09be22c5bd975a884</a></td></tr><tr><td><strong>场景元数据脚本 API</strong><br><code>ConvaiObjectMetadata</code>, <code>ConvaiMetadataRegistry</code>，以及 <code>ConvaiSceneMetadataCollector</code> 公共方法。</td><td><a href="/pages/553ff838d38639ef80a27f8380dc466768470562">/pages/553ff838d38639ef80a27f8380dc466768470562</a></td></tr><tr><td><strong>场景元数据使用示例</strong><br>用于医疗培训、工业安全、博物馆导览、运行时对象排除和跟踪属性的完整设置。</td><td><a href="/pages/16c5aa93667aec71180b560b3408b114f488e893">/pages/16c5aa93667aec71180b560b3408b114f488e893</a></td></tr><tr><td><strong>场景元数据故障排查</strong><br>针对 AI 忽略对象、验证错误、元数据有效载荷为空以及依赖项失败的诊断。</td><td><a href="/pages/f6f3f3d88a3636afea1b0c8774162c2014fba780">/pages/f6f3f3d88a3636afea1b0c8774162c2014fba780</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/scene-metadata.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.
