> 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/unity-plugin/troubleshooting-guide/macos-permission-issues.md).

# macOS 权限问题

## 在 macOS 中允许 grpc\_csharp\_ext.bundle DLL 文件

在 MacOS 上的 Unity 中使用外部 DLL 可能会因为 Apple 严格的安全措施而导致安全权限问题。以下是解决这一常见问题的分步指南。

1. **验证问题**:

   <figure><img src="/files/ce76e6e610105c2149b013da17d3343e577e115a" alt=""><figcaption></figcaption></figure>
2. **手动允许被阻止的 DLL**:

   * 在你的 Mac 上打开“系统偏好设置”。
   * 进入“安全性与隐私”。

   <img src="/files/a0d98febf1d2d64d987b0c3b14354c93e93c192f" alt="" data-size="original">

   * 在“安全性”选项卡下，你可能会在底部看到一条关于该 DLL 被阻止的消息。点击“仍要允许”或“仍要打开”，如果提示则输入密码。

   ![](/files/ebba1bf3decc905a262f3540630307151afe66db) ![](/files/8c549454ed0173eb9a773b62669eb1ee652a04fd)
3. **修改 Gatekeeper 设置**：MacOS 的 Gatekeeper 可能会阻止未识别开发者的软件运行。要允许该 DLL：
   * 打开终端（在“应用程序”>“实用工具”中找到）。
   * 类型 `sudo spctl --master-disable` 然后按回车。
   * 此命令将允许从任何来源下载应用程序。
   * 现在，尝试再次运行 Unity 项目。
   * 完成后，你应该使用以下命令重新启用 Gatekeeper： `sudo spctl --master-enable` 以避免任何恶意软件。
4. **检查文件权限**：确保该 DLL 具有正确的文件权限。
   * 在 Finder 中，右键单击（或按住 control 单击）该 DLL 文件并选择“显示简介”。
   * 在“共享与权限”下，确保你的用户帐户具有“读与写”权限。
5. **检查 Unity 的插件设置**:
   * 在 Unity 编辑器中，在项目视图中选择该 DLL。
   * 在检视器窗口中，确保为该 DLL 选择了合适的平台（此处为 Mac OS X）和架构（Apple Silicon、Intel-64）。
   * 确保已勾选“Load on Startup”和其他相关选项（默认应已启用）

## 构建时在 Player Settings 中的 Mac 配置

* **更新 Mac 配置：**

  * 在 Unity 中，导航到 `编辑 > 项目设置 > Player`.
  * 向下滚动并点击 `其他设置`

  <figure><img src="/files/4ca59a23a340f4e4c53c31459825490fadaa0aa4" alt=""><figcaption></figcaption></figure>

  * 再次向下滚动，找到 Mac Configuration 部分

  <figure><img src="/files/a036964aa552a340f509c41afac7a3bbb5869c5c" alt=""><figcaption></figcaption></figure>

  * 更新 Mac Configuration 部分（请参考下方截图）

  <figure><img src="/files/9ab7ff53bdb636ce6d321b64bac7acdd350a8c67" alt=""><figcaption></figcaption></figure>


---

# 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/unity-plugin/troubleshooting-guide/macos-permission-issues.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.
