> 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 配置——所有功能，包括视觉、空间音频和屏幕共享，在标准设置后即可工作。

桌面构建没有特定平台的配置要求。所有 SDK 功能都无需额外设置即可使用——无需权限声明、无需修改清单、无需手势处理。麦克风访问、音频播放、空间音频、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 构建会被识别为桌面应用，并且无需任何清单更改即可获得麦克风访问权限。
* **macOS：** 当应用首次访问麦克风时，操作系统会显示一次性的系统权限对话框。Unity 会添加 `NSMicrophoneUsageDescription` 到应用的 `Info.plist` ，并会自动应用于 macOS 构建。无需手动配置。
* **Linux：** 麦克风访问由系统音频栈（PulseAudio、PipeWire、ALSA）处理。不需要应用级权限处理。

### 桌面端的 Vision

`CameraVisionFrameSource` 可在所有桌面平台上运行，无需额外配置——将组件添加到 `摄像机` 一个 GameObject，分配一个 `ConvaiVisionPublisher`，Vision 即可启用。

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

### 使用示例

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

一家国防承包商在 Windows 工作站上运行任务演练软件。Convai 角色扮演敌对部队、本地指挥官和平民角色，参与一个分支情景。受训者使用标准桌面麦克风与角色交谈。

**设置：** 标准 SDK 配置——无需特定平台步骤。空间音频会将角色的声音以 3D 空间方式定位到玩家位置周围。

**结果：** 受训者在任务模拟中与多个角色进行口头互动。该会话会记录回应和分支决策，供事后复盘。

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

一所医学院在教师的 MacBook Pro 上部署了患者问诊训练器。住院医师练习采集病史，与一个会以真实症状回应并根据住院医师提问进行调整的 Convai 角色进行练习。

**设置：** 标准 SDK 配置。该角色通过 `CameraVisionFrameSource` 进行 Vision，镜头对准住院医师正在检查的实体模型。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, and the optional `goal` 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>&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.
