> 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 可在所有主要的 Unity 部署目标上运行。功能可用性因平台而异——在针对特定目标构建之前，请使用下表确认支持情况。

### 功能 × 平台矩阵

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

### 平台特定要求

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

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

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

{% hint style="info" %}
始终在实际托管环境中验证 WebGL 构建，尤其是在构建嵌入 iframe 时。若将构建嵌入到您控制的页面中，请在 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` 中声明该权限，并在应用流程中处理允许和拒绝两种情况。
* **Vision — 网络摄像头：** `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 Settings → Other Settings → iOS → Microphone Usage Description**。省略此项会导致首次访问麦克风时崩溃。
* **Vision — 网络摄像头：** `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](/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` 场景中存在的组件

导入 Meta XR SDK 时，会自动声明所需的透视摄像头权限。

在其他 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
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>
```

The question should be specific, self-contained, and written in natural language.
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.
