---
metadata:
  - name: generator
    content: Diplodoc Platform v5.52.0
alternate:
  - https://ads.yandex.com/helpcenter/en/dev/unity/quick-start-mm.md
  - https://ads.yandex.com/helpcenter/pt/dev/unity/quick-start-mm.md
  - https://ads.yandex.com/helpcenter/ru/dev/unity/quick-start-mm.md
  - https://ads.yandex.com/helpcenter/zh/dev/unity/quick-start-mm.md
  - href: zh/dev/unity/quick-start-mm.md
    type: text/markdown
    title: Markdown version
  - href: llms.txt
    type: text/markdown
    title: llms.txt
---
> **Documentation Index:** Fetch the complete configuration index at https://ads.yandex.com/helpcenter/zh/llms.txt

# 集成 Yandex 聚合

{% note warning %}

请确保更新到最新的适配器版本（[Yandex 移动聚合](https://ads.yandex.com/helpcenter/zh/dev/unity/list-network.md) 及适配器 [第三方聚合网络适配器](https://ads.yandex.com/helpcenter/zh/dev/unity/third-party-mediation.md)）。否则可能会因适配器集成不当而出现错误，导致广告无法投放。


{% endnote %}

[移动聚合](https://ads.yandex.com/helpcenter/zh/monetization/yandex-mediation/index.md) 是一个使用机器学习算法从各种网络自动选择广告的平台，能够最大限度地提高您的收入。所有设置均开箱即用，因此您无需单独设置每个网络。

如果您之前仅在一个 Yandex 网络中使用 Mobile Ads SDK，则无需更改代码中的任何内容即可迁移到 Yandex 聚合。您只需预设第三方广告网络的网页界面的相关部分即可。

Mobile Ads Unity 是一款用于 [Unity3d](https://docs.unity3d.com/Manual/index.html) 游戏平台的插件，支持 Yandex Mobile Ads SDK。


## 前提条件

要准备您的应用，请按照接下来的章节中描述的步骤进行操作。

### 应用要求

* SDK 需要目标 API 级别为版本 31 或更高版本。
* 要加载任意类型的广告，iOS 版本需为 13 或更高版本。
* 使用 Xcode 16.4 或更高版本。

### 在您的 Yandex Advertising Network 账户中设置应用

<!-- source: zh/dev/_includes/reg.md -->
以下是在 Yandex Advertising Network 中注册您的应用的方法：

1. 在 Yandex Advertising Network 中 [登录](https://partner.yandex.ru/)  或 [登录](https://passport.yandex.com/auth/list?origin=rsy_ligth_out&retpath=https%3A%2F%2Fpartner.yandex.com%2Fform%2F?roles%5B%5D=27) 您的账户。
2. 在 Yandex Advertising Network 中 [注册](https://passport.yandex.com/auth/list?origin=rsy_ligth_out&retpath=https%3A%2F%2Fpartner.yandex.com%2Fform%2F?roles%5B%5D=27) 您的应用。
<!-- endsource: zh/dev/_includes/reg.md -->

## 集成

<!-- source: zh/dev/_includes/unity-library-ads.md -->
{% note warning %}

`yandex-ads-unity-plugin` 仅在 Android 和 iOS 环境中运行。广告当前无法在 Unity 编辑器中加载和展示。

{% endnote %}
<!-- endsource: zh/dev/_includes/unity-library-ads.md -->

要连接单独的适配器，请添加一个包含受支持的 `yandex-mobileads-lite-x.x.x.unitypackage` 版本的包，并按照这些适配器的说明连接所需的适配器：

1. 在 Yandex Advertising Network 界面中 [设置聚合](https://ads.yandex.com/helpcenter/zh/monetization/yandex-mediation/setup.md)。

2. 下载 [yandex-ads-unity-plugin](https://github.com/yandexmobile/yandex-ads-unity-plugin) 目录并添加包 `yandex-mobileads-lite-8.3.0.unitypackage`。系统还会提示您安装 Google 解析器。如果您先前已将 Google 解析器添加到自己的项目中，请清除该复选框。

      {% cut "如何添加包" %}

      选择所需的插件 (**Assets** → **Import Package** → **Custom Package**)，然后单击 **Import**。

      {% endcut %}

3. 使用 Google 解析器安装依赖项：启用  **auto-resolve** 或者在菜单中选择  **Assets** → **External Dependency Manager** → **Android Resolver** → **Resolve**。

4. 要测试 Mobile Ads Unity 插件，请使用 [yandex-ads-unity-plugin](https://github.com/yandexmobile/yandex-ads-unity-plugin) 存储库中的 **samples** 目录中的演示脚本。将脚本复制到项目目录并将其作为**Component** 添加到主摄像头。

5. 使用适当的包单独连接所需的 [适配器](https://ads.yandex.com/helpcenter/zh/dev/unity/list-network.md)。
