Integrate Unity Ads with Mediation
This guide explains how to utilize the Google Mobile Ads SDK for loading and presenting ads from Unity Ads through mediation. It provides instructions on integrating Unity Ads into the mediation configuration of a Godot app and integrating the Unity Ads SDK and adapter into your Godot app.
This document is based on:
Supported integrations and ad formats
The AdMob mediation adapter for Unity Ads has the following capabilities:
| Integration | |
|---|---|
| Bidding | ✅ |
| Waterfall | ✅ |
| Formats | |
|---|---|
| Banner | ✅ |
| Interstitial | ✅ |
| Rewarded | ✅ |
| Rewarded Interstitial | ✅ |
Prerequisites
- Complete the Get started guide
- Complete the mediation Get started guide
Step 1: Set up Unity Ads
We recommend following the tutorial for Android or iOS, as it will be the same for both.
Step 2: Configure mediation settings for your AdMob ad unit
We recommend following the tutorial for Android or iOS, as it will be the same for both.
Step 3: Import the Unity Ads SDK plugin
- Download the plugin for Android.
- Extract the
.zipfile. Inside, you will find aunity_adsfolder. - Copy the contents of the
unity_adsfolder and paste them into the Android plugin folder atres://addons/admob/android/bin/.
The Unity Ads adapter is already included in the standard iOS plugin download. If you followed the iOS Installation guide, you should already have the necessary files (poing-godot-admob-unity_ads.gdip and related frameworks) in your res://ios/plugins/ directory.
Step 4: Enable the plugin
Make sure to enable Unity Ads in Project Settings (under Admob > Android > Mediation > Unity Ads).
Make sure to check both Ad Mob and Ad Mob Unity Ads under the Plugins list in your iOS Export Presets (as well as entering your AdMob App ID in the Plists config).
Step 5: Additional settings
EU User Consent Policy
To pass consent information to the Unity Ads SDK, use the following code:
Privacy Consent
To set privacy consent (e.g., for CCPA), use the following code: