> 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 功能都可在无需额外设置的情况下工作——无需权限声明、无需修改清单、无需手势处理。标准 SDK 设置完成后，麦克风访问、音频播放、空间音频、Vision 和屏幕共享都会立即生效。

### 功能支持

| 功能                     | 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` 可在所有桌面平台上工作，无需额外配置——将组件添加到一个 `Camera` 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 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.
