> 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` | ⚠️ 通过浏览器路由             |
| 口型同步          | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ⚠️ 已知的时序漂移             |
| 空间音频          | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ❌ 不支持                  |
| 动作            | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ✅ 完全支持                 |
| Emotion       | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ✅ 完全支持                 |
| 长期记忆          | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ✅ 完全支持                 |
| 叙事设计          | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ✅ 完全支持                 |
| 动态上下文         | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ✅ 完全支持                 |
| 视觉 — 摄像头      | ✅ 完全支持                  | ✅ 完全支持                | ✅ 完全支持                           | ✅ 完全支持                | ⚠️ 画布捕获                |
| 视觉 — 网络摄像头    | ✅ 完全支持                  | ⚠️ 需要运行时权限            | ⚠️ `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 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](/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 头显](/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, and the optional `goal` 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>&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.
