Integrating via Unity Package Manager

Using Package Manager in the Project Settings tab of the Unity editor with the OpenUPM public registry allows you to integrate Yandex Mobile Ads dependencies without manual .unitypackage imports. With this approach, you can install the main SDK package and any individual packages of ad network adapters from the supported list, if needed. To enable mediation, use the package Yandex Mobile Ads Mediation plugin for Unity.

Note

An adapter is a module that serves as a mediator between the Yandex Advertising Network and a third-party ad network.

Connecting via OpenUPM

Connecting OpenUPM Registry
  1. In Unity, select EditProject Settings in the top menu. In the new window, select Package Manager on the left:

  2. Add a registry named OpenUPM with the following fields:

    • URL: https://package.openupm.com.
    • Scopes with two values: com.yandex and com.google.
Integrating iOS or Android

Yandex SDK 7.16.0+

Integration via UPM starting with version 7.16.0 is relevant for all supported Unity versions.

Go to the Yandex Mobile Ads tab in OpenUPM and install the required package Yandex Mobile Ads plugin for Unity.

Warning

Once the SDK is installed, you'll see an External Dependency Manager activation window. Click Enable to resolve dependencies.

Yandex SDK 7.14.x and 7.15.x

The instructions below are applicable only to minor Yandex SDK versions 14 and 15.

Integrating with Unity 2023 or lower
  1. Go to the Yandex Mobile Ads tab in OpenUPM and install the required package Yandex Mobile Ads Mediation plugin for Unity.

    Warning

    Once the SDK is installed, you'll see an External Dependency Manager activation window. Click Enable to resolve dependencies.

  2. In the Unity project tree, go to the Assets/Plugins/Android folder and open mainTemplate.gradle.

  3. In the main Dependencies block at the beginning of the file, add the code block (the second dependency in the snippet). Libraries must have the same major and minor versions. You can verify this in our official repository.

    	dependencies {
    		// ... other dependencies
    		implementation("com.yandex.android:mobileads:7.15.1") // The main package installed via UPM
    
    		// Add these lines to the existing dependencies
    		implementation("com.yandex.android:mobileads:7.15.0-unity") {
    			force = true
    		}
    	}
    

Connecting manually by importing SDK packages

Integrating iOS or Android

Yandex SDK 7.16.0+

Integration via UPM starting with version 7.16.0 is relevant for all supported Unity versions.

  1. Open our GitHub repository and download the package:

    yandex-mobileads-lite-8.0.0.unitypackage
    
  2. In Unity, go to Assets/Import Package/Custom Package in the top menu and chose the package you downloaded earlier.

    Warning

    Once the SDK is installed, you'll see an External Dependency Manager activation window. Click Enable to resolve dependencies.

Yandex SDK 7.14.x and 7.15.x

The instructions below are applicable only to minor Yandex SDK versions 14 and 15.

Integrating the core build with Unity 2023 or lower
  1. Open our GitHub repository and download the package:

    yandex-mobileads-lite-7.15.1.unitypackage
    

    Warning

    Once the SDK is installed, you'll see an External Dependency Manager activation window. Click Enable to resolve dependencies.

  2. In the Unity project tree, go to the Assets/Plugins/Android folder and open mainTemplate.gradle.

  3. In the main Dependencies block at the beginning of the file, add the code block (the second dependency in the snippet). Libraries must have the same major and minor versions. You can verify this in our official repository.

    dependencies {
        // ... other dependencies
        implementation("com.yandex.android:mobileads:7.15.1") // The main package installed via UPM
        implementation("com.yandex.android:mobileads:7.15.0-unity") {
            force = true
        }
    }