> 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).

# 平台支持矩阵

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`. 在 `AudioSource` 组件上的音量和空间化控制在 WebGL 中不起作用。
* **视觉——摄像头** 使用浏览器画布捕获（`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](/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](/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 设置 → 其他设置 → iOS → 麦克风使用说明**。省略此项会导致首次访问麦克风时崩溃。
* **视觉——网络摄像头：** `NSCameraUsageDescription` 必须在 **Player 设置 → 其他设置 → iOS → 摄像头使用说明** 如果你使用 `WebcamVisionFrameSource`。在 iOS 上， `WebcamVisionFrameSource` 通过 Unity 的 `WebCamTexture` API 访问设备摄像头。
* 请定义当用户拒绝麦克风或摄像头权限，以及在对话过程中应用被中断或进入后台时，应用的行为。

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

{% content-ref url="/pages/a05c31e79a2f905396785b4f77b4554fc046528d" %}
[iOS 和 Android](/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` 需要这两项都已事先授予。请在项目的 manifest 中声明它们，并在依赖透视捕获之前确认已授予。

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

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

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

{% content-ref url="/pages/eaa8f2e135526b94c0bfa16f39b4e7f1cc91ca79" %}
[XR 头显](/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 要求](/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.
