> 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/platform-guides/windows-macos-and-linux.md).

# Windows、macOS 和 Linux

Windows、macOS 和 Linux 构建无需额外的 SDK 配置——完成标准设置后，包括 Vision、空间音频和屏幕共享在内的所有功能均可使用。

桌面版构建没有平台专属的配置要求。所有 SDK 功能都无需额外设置即可使用——无需声明权限、修改清单或处理手势。完成标准 SDK 设置后，麦克风访问、音频播放、空间音频、Vision 和屏幕共享都能立即正常运行。

### 功能支持

| 功能                     | Windows | macOS  | Linux  |
| ---------------------- | ------- | ------ | ------ |
| 语音对话                   | ✅ 完全支持  | ✅ 完全支持 | ✅ 完全支持 |
| 唇形同步                   | ✅ 完全支持  | ✅ 完全支持 | ✅ 完全支持 |
| 动作                     | ✅ 完全支持  | ✅ 完全支持 | ✅ 完全支持 |
| 情绪                     | ✅ 完全支持  | ✅ 完全支持 | ✅ 完全支持 |
| 长期记忆                   | ✅ 完全支持  | ✅ 完全支持 | ✅ 完全支持 |
| 叙事设计                   | ✅ 完全支持  | ✅ 完全支持 | ✅ 完全支持 |
| 视觉                     | ✅ 完全支持  | ✅ 完全支持 | ✅ 完全支持 |
| 空间音频                   | ✅ 完全支持  | ✅ 完全支持 | ✅ 完全支持 |
| Unity `AudioSource` 播放 | ✅ 完全支持  | ✅ 完全支持 | ✅ 完全支持 |
| 麦克风设备选择                | ✅ 完全支持  | ✅ 完全支持 | ✅ 完全支持 |
| 屏幕共享                   | ✅ 完全支持  | ✅ 完全支持 | ✅ 完全支持 |

屏幕共享是桌面平台专属功能，WebGL、iOS、Android 和基于 Android 的 XR 头显均不支持。

### 平台与架构支持

SDK 提供以下桌面配置的预构建原生库：

| 平台      | 支持的架构                                         |
| ------- | --------------------------------------------- |
| Windows | x86\_64、arm64                                 |
| macOS   | arm64（Apple Silicon）、x86\_64（Intel）、Universal |
| Linux   | x86\_64                                       |

{% hint style="warning" %}
**不支持 Linux arm64。** 如果部署目标包含 Linux arm64 设备，原生传输库将无法加载，语音对话也将无法使用。Linux 仅支持 x86\_64。
{% endhint %}

### 麦克风与音频

桌面平台无需声明权限。操作系统会在应用程序级别授予麦克风访问权限：

* **Windows：** 访问权限通过 Windows 隐私设置管理。Unity 构建会被识别为桌面应用程序，无需修改清单即可获得麦克风访问权限。
* **macOS：** 应用程序首次访问麦克风时，操作系统会显示一次系统权限对话框。Unity 会自动为 macOS 构建将 `NSMicrophoneUsageDescription` 添加到应用的 `Info.plist` 中。无需手动配置。
* **Linux：** 麦克风访问由系统音频栈（PulseAudio、PipeWire、ALSA）处理。无需在应用程序级别处理权限。

### 桌面平台上的 Vision

`CameraVisionFrameSource` 在所有桌面平台上均无需额外配置即可使用——将该组件添加到 `Camera` GameObject，为其指定一个 `ConvaiVisionPublisher`，即可启用 Vision。

{% hint style="info" %}
摄像头采集会在内部对像素进行垂直翻转，以确保帧方向正确。所有桌面平台都会自动处理此操作，无需配置。
{% endhint %}

### 使用示例

#### Windows 上的军事任务演练

一家国防承包商在 Windows 工作站上运行任务演练软件。Convai 角色在分支场景中扮演敌对势力、当地指挥官和民间人员。受训人员使用标准桌面麦克风与角色交谈。

**设置：** 采用标准 SDK 配置，无需执行平台专属步骤。空间音频会根据玩家的位置，将角色语音置于 3D 空间中。

**结果：** 受训人员在任务模拟中与多个角色进行语音互动。系统会记录回应和分支决策，以供事后复盘。

#### macOS 上的医疗问诊培训

一所医学院在教师使用的 MacBook Pro 上部署了患者问诊训练工具。住院医师通过与 Convai 角色互动来练习采集患者病史；该角色会表现出逼真的症状，并根据住院医师的问题调整回应。

**设置：** 采用标准 SDK 配置。角色通过以下组件使用 Vision： `CameraVisionFrameSource` 指向居民正在查看的实体模型。首次启动时，macOS 会提示授予麦克风访问权限——无需进行其他设置。

**结果：** 居民可以自然地与角色交谈。macOS 麦克风权限对话框仅在首次启动时出现。Vision 让角色能够识别并回应居民在场景中拿着的物品。

#### Linux 上的合规培训终端

一家制造公司在安全设施内的 Linux 工作站上开展安全合规培训。与 Windows 上使用的 Unity 构建版本相同，无需修改即可部署到 Ubuntu x86\_64 机器。

**设置：** 使用标准 SDK 配置。确保部署机器运行的是 x86\_64 Linux——不支持 arm64。无需更改音频配置；PulseAudio 或 PipeWire 会自动处理麦克风访问。

**结果：** 操作人员在终端通过与 Convai 角色交谈完成合规评估。体验与 Windows 部署完全相同。

### 后续步骤

桌面版本无需针对特定平台进行额外处理。场景验证完成后，即可构建并发布。如果还要面向 WebGL、iOS、Android 或 XR 头显进行开发，请在构建前查看相应的平台指南。

{% 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 %}

{% 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 %}

{% 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 %}


---

# 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/platform-guides/windows-macos-and-linux.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.
