> 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/advanced-topics.md).

# 自定义并扩展 SDK

替换 SDK 提供的提供器，使用自己的模块扩展运行时，并借助内置遥测诊断延迟。

Convai Unity SDK 可开箱即用，适用于大多数训练模拟、交互式体验和游戏。本节介绍当默认设置不适合你的部署时应如何处理：用自定义实现替换内置提供程序、借助内置遥测诊断性能问题，以及向运行时添加自定义模块。

{% hint style="info" %}
这些页面默认你已熟练掌握 C#，并熟悉 Unity 的组件生命周期。如果你还在设置第一个场景，请先从 [入门指南](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/getting-started.md) 部分。
{% endhint %}

<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>将 SDK 的凭据、身份和持久化系统替换为你自己的实现。对于 CI 流水线、基于认证的身份体系以及云存档集成至关重要。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/advanced-topics/custom-providers.md">凭证、身份和存储</a></td></tr><tr><td><strong>日志、指标和重试策略</strong><br>按子系统调整日志详细级别，读取服务器端管道延迟指标，并配置重试行为以实现更稳健的连接。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/advanced-topics/performance-and-optimization.md">日志、指标和重试策略</a></td></tr><tr><td><strong>运行时模块系统</strong><br>了解何时构建自定义模块、模块生命周期如何运作，以及哪些 SDK 扩展点可以安全使用。</td><td><a href="/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/advanced-topics/extending-the-sdk.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/advanced-topics.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.
