> 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

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

### 功能支持

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

屏幕共享是桌面端专属功能——在 WebGL、iOS、Android 或基于 Android 的 XR 头显上不可用。

### 平台和架构支持

SDK 为以下桌面配置提供预编译的原生库：

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

{% hint style="warning" %}
**不支持 Linux arm64。** 如果你的部署目标包含 Linux arm64 机器，本地传输库将无法加载，语音对话将无法工作。Linux 仅提供 x86\_64。
{% endhint %}

### 麦克风和音频

桌面平台不需要权限声明。操作系统在应用层授予麦克风访问权限：

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

### 桌面端的 Vision

`CameraVisionFrameSource` 可在所有桌面平台上正常工作，无需额外配置——将该组件添加到一个 `Camera` GameObject，分配一个 `ConvaiVisionPublisher`，Vision 即可激活。

{% hint style="info" %}
摄像头捕获会在内部应用垂直像素翻转，以确保正确的帧方向。这在所有桌面平台上都会自动处理——无需配置。
{% endhint %}

### 使用示例

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

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

**设置：** 标准 SDK 配置——无需平台特定步骤。空间音频会根据玩家位置将角色声音置于三维空间中。

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

#### 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](/api-docs/zh/cha-jian-yu-ji-cheng/convai-unity-sdk/platform-guides/webgl.md)
{% endcontent-ref %}

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

{% content-ref url="/pages/eaa8f2e135526b94c0bfa16f39b4e7f1cc91ca79" %}
[XR 头显](/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 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/platform-guides/windows-macos-and-linux.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.
