> 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 权限问题

Unity 中自定义 DLL 的 macOS 安全权限问题，以及构建设置中的 Mac 配置

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

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

1. **验证问题**:

   <figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FY6P8md2A4kHWrABLIwhx%2FScreenshot%202023-09-09%20205554.png?alt=media&amp;token=5fd0766b-76f0-4c00-8c5f-afc971b42140" alt=""><figcaption></figcaption></figure>
2. **手动允许被阻止的 DLL**:

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

   <img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2F81v4Q2UjJLVQXozGQsPg%2FScreenshot%202023-09-09%20205654.png?alt=media&amp;token=559a00b7-ff7a-49a3-9b75-ef5932429581" alt="" data-size="original">

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

   ![](https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FM3rQrVnrH7f7RnRZbnSo%2FScreenshot%202023-09-09%20205734.png?alt=media\&token=c0550e28-d69b-4793-b791-6af478da5901) ![](https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FN52rVTRZFhePjX0xg9Xk%2FScreenshot%202023-09-09%20205753.png?alt=media\&token=6fd6a89e-244d-44e6-8458-118bd611468b)
3. **修改 Gatekeeper 设置**: MacOS 的 Gatekeeper 可能会阻止来自未知开发者的软件运行。要允许该 DLL：
   * 打开终端（位于“应用程序”>“实用工具”中）。
   * 类型 `sudo spctl --master-disable` 然后按回车。
   * 此命令将允许从任何来源下载应用。
   * 现在，再次尝试运行 Unity 项目。
   * 完成后，你应该使用以下命令重新启用 Gatekeeper： `sudo spctl --master-enable` 以避免任何恶意软件。
4. **检查文件权限**: 确保该 DLL 具有正确的文件权限。
   * 在 Finder 中，右键单击（或按住 Control 键单击）该 DLL 文件，然后选择“显示简介”。
   * 在“共享与权限”下，确保你的用户账户具有“读与写”权限。
5. **检查 Unity 的插件设置**:
   * 在 Unity 编辑器中，在项目视图中选中该 DLL。
   * 在 Inspector 窗口中，确保为该 DLL 选择了正确的平台（在本例中为 Mac OS X）和架构（Apple Silicon、Intel-64）。
   * 确保勾选了“Load on Startup”和其他相关选项（默认应为启用）

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

* **更新 Mac 配置：**

  * 在 Unity 中，导航到 `Edit > Project Settings > Player`.
  * 向下滚动并点击 `Other Settings`

  <figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FFoMmByuE7brZR9ixa9z6%2FScreenshot%202023-09-09%20205901.png?alt=media&amp;token=baf36b35-4bd0-473e-90bb-ddb6cd86e82e" alt=""><figcaption></figcaption></figure>

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

  <figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2Ffsys4XI8X9j9KLK1H9Ku%2FScreenshot%202023-09-09%20205922.png?alt=media&amp;token=727d3b81-a1ba-4942-b58e-6610399dcd53" alt=""><figcaption></figcaption></figure>

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

  <figure><img src="https://2402152281-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FEtUJA212Zc1S9ACc8T4l%2Fuploads%2FAjzCB87txDLXWw89Gi3V%2FScreenshot%202023-09-09%20205958.png?alt=media&amp;token=d2e26ae9-d01e-4625-ae50-ab8fb89f881b" 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 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/unity-plugin/troubleshooting-guide/macos-permission-issues.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.
