> 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/compatibility-and-requirements/platform-support-matrix.md). Agents can also search and read this documentation through its [MCP server](https://docs.convai.com/api-docs/~gitbook/mcp).

# 平台支持矩阵

Convai Unity SDK 平台支持参考，包括 Windows、macOS、Android、iOS、Meta Quest 和 WebGL 的功能可用性。

Convai Unity SDK 可在所有主流 Unity 部署目标上运行。各平台的功能支持情况有所不同——针对特定目标构建前，请使用下方矩阵确认支持情况。

### 功能 × 平台矩阵

| 功能            | Windows / macOS / Linux | Android               | iOS                              | Meta Quest            | WebGL                   |
| ------------- | ----------------------- | --------------------- | -------------------------------- | --------------------- | ----------------------- |
| 语音对话          | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ✅ 完全支持                  |
| 麦克风采集         | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ✅ 完全支持 — 需要 HTTPS 和用户手势 |
| 远程音频播放        | ✅ Unity `AudioSource`   | ✅ Unity `AudioSource` | ✅ Unity `AudioSource`            | ✅ Unity `AudioSource` | ⚠️ 通过浏览器路由              |
| 唇形同步          | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ⚠️ 已知存在时序漂移             |
| 空间音频          | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ❌ 不支持                   |
| 动作            | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ✅ 完全支持                  |
| 情绪            | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ✅ 完全支持                  |
| 长期记忆          | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ✅ 完全支持                  |
| 叙事设计          | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ✅ 完全支持                  |
| 动态上下文         | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ✅ 完全支持                  |
| 视觉 — 摄像头      | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ⚠️ 画布捕获                 |
| 视觉 — 网络摄像头    | ✅ 完全支持                  | ⚠️ 需要运行时权限            | ⚠️ `NSCameraUsageDescription` 必需 | ❌ 不适用                 | ❌ 不支持                   |
| 视觉 — Quest 透视 | ❌ 不支持                   | ❌ 不支持                 | ❌ 不支持                            | ✅ 完全支持                | ❌ 不支持                   |

### 平台特定要求

{% tabs %}
{% tab title="WebGL" %}
WebGL 完全受支持，但需遵守浏览器安全策略施加的以下限制：

* **麦克风采集** 需要使用 HTTPS 或 `localhost`。HTTP 部署无法访问麦克风。请在用户手势（按钮点击）触发时调用 `ConvaiManager.EnableAudioAndStartListening()` ——不要在场景加载时自动启动音频。
* **远程音频播放** 通过浏览器的音频系统路由，而不是 Unity 的 `AudioSource`。在 WebGL 中，对 `AudioSource` 组件设置的音量和空间化控制均不起作用。
* **视觉 — 摄像头** 使用浏览器画布捕获（支持`CameraVisionFrameSource` ）。
* **视觉 — 网络摄像头** (`WebcamVisionFrameSource`）在 WebGL 上不受支持—— `AsyncGPUReadback` 在浏览器运行时中不可用。请使用 `CameraVisionFrameSource` 来串流游戏画布。
* **空间音频** 在 WebGL 上不受支持。

{% hint style="warning" %}
WebGL 存在一个已知的音频/唇形同步时序漂移缺陷——音频和唇形同步数据都能正确到达，但在浏览器构建中，播放时序可能发生漂移。这是一个已跟踪的缺陷，并非缺少某项功能。发布前，请在目标浏览器中进行验证。
{% endhint %}

{% hint style="info" %}
务必在实际托管环境中验证 WebGL 构建，尤其是将构建嵌入 iframe 时。如果你将构建嵌入自己控制的页面，请将 `allow="microphone"` 添加到 iframe 标签中。
{% endhint %}

有关 WebGL 设置、浏览器兼容性和部署步骤的详细信息，请参阅 WebGL 平台指南。

{% content-ref url="/pages/6cfceeb85df8a63f5076c12cd7b38b5a932ed4e8" %}
[WebGL](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/platform-guides/webgl.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="Android" %}

* **麦克风：** SDK 会在运行时通过 `RECORD_AUDIO` 请求权限，使用的是 `ConvaiPermissionService`。请在 `AndroidManifest.xml` 中声明此权限，并在应用流程中处理授予和拒绝两种情况。
* **视觉——网络摄像头：** `android.permission.CAMERA` 由 `WebcamVisionFrameSource`在运行时请求。请在应用流程中处理权限授予和拒绝的情况。

有关 Android 构建配置、权限处理和麦克风设置的信息，请参阅 iOS 和 Android 平台指南。

{% content-ref url="/pages/a05c31e79a2f905396785b4f77b4554fc046528d" %}
[iOS 和 Android](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/platform-guides/ios-and-android.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="iOS" %}

* **麦克风：** `NSMicrophoneUsageDescription` 必须在 **Player Settings → Other Settings → iOS → Microphone Usage Description**中设置。若未设置，首次访问麦克风时会导致崩溃。
* **视觉——网络摄像头：** `NSCameraUsageDescription` 必须在 **Player Settings → Other Settings → iOS → Camera Usage Description** 中设置（如果你使用 `WebcamVisionFrameSource`）。在 iOS 上， `WebcamVisionFrameSource` 通过 Unity 的 `WebCamTexture` API 访问设备摄像头。
* 请定义用户拒绝麦克风或摄像头权限时的应用行为，以及在对话期间应用被中断或转入后台时的处理方式。

有关 iOS 构建配置、权限设置和 Info.plist 要求的信息，请参阅 iOS 和 Android 平台指南。

{% content-ref url="/pages/a05c31e79a2f905396785b4f77b4554fc046528d" %}
[iOS 和 Android](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/platform-guides/ios-and-android.md)
{% endcontent-ref %}
{% endtab %}

{% tab title="Meta Quest" %}
Quest 透视视觉功能（`QuestVisionFrameSource`）仅支持 **Quest 3 和 Quest 3S**.

**要求：**

* 项目中已导入 Meta XR SDK
* `场景中包含` PassthroughCameraAccess
* 组件 `应用已获得` horizonos.permission.HEADSET\_CAMERA `和` android.permission.CAMERA

权限 `Convai Unity SDK 不会随附 AndroidManifest.xml` 且自身不会声明或请求这些权限 — `QuestVisionFrameSource` 要求这两项权限都已获准。请在项目的清单文件中声明这些权限，并在依赖透视捕获功能之前确认权限已获准。

在其他 Quest 硬件或非 Quest 平台上， `QuestVisionFrameSource` 不会生成帧。请改用 `CameraVisionFrameSource` 或 `WebcamVisionFrameSource` 。

`WebcamVisionFrameSource` 不适用于 Meta Quest，因为 Quest 不提供标准的 `WebCamTexture` 设备。

有关 Meta Quest 项目设置、XR SDK 配置和透视 Vision 集成，请参阅 XR 头显平台指南。

{% content-ref url="/pages/eaa8f2e135526b94c0bfa16f39b4e7f1cc91ca79" %}
[XR 头显](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/platform-guides/xr-headsets.md)
{% endcontent-ref %}
{% endtab %}
{% endtabs %}

### 后续步骤

确认平台限制后，请查看实时 SDK 运行所需的网络要求。

{% content-ref url="/pages/70605859c41efad8e54d545f6c11bf507c578f33" %}
[网络和 API 要求](https://docs.convai.com/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/compatibility-and-requirements/network-and-api-requirements.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-unity-sdk/compatibility-and-requirements/platform-support-matrix.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.
