Unity Ads Integration Guide
This guide will instruct you step-by-step on how to set Unity Ads live as an Ad Network on Unity LevelPlay.
Before you start Make sure you have correctly integratedStep 1. Set up Unity Ads
Complete the following steps before setting up Unity Ads:
- Create a Unity ID
- Sign up for Unity Gaming Services: select Get started for free.
Step 2. Create a project in Unity Ads
Follow these steps to create your Unity Ads application:
Create an application
-
- On the Unity Monetization Dashboard, select Projects. For more information about navigating the dashboard, see Introduction to the Unity Dashboard
- Select Organization > Projects
- Select Create project
4. Enter a project name and COPPA designation.
5. Select Create project.
To monetize your project, you’ll need to enable Unity Ads in the dashboard. Select Get started from the Monetization dashboard > secondary navigation menu.
When you initialize Unity Ads for your project, you must select a mediation provider. Select I plan to use Mediation > Unity LevelPlay.
Create an ad unit
Use an Ad Unit to surface an event in your game that triggers ad content:
- From the left navigation menu, select Monetization > Ad Units
- Select Add Ad Unit to bring up the creation modal
- Enter an Ad Unit name, then select a Platform (iOS or Android) and ad format (Rewarded, Interstitial, or Banner).
- Select Create to save your Ad Unit
Add a placement
Once your project is created, navigate to Monetization > Placements and take note of the Game ID for both platforms.
To create a new placement, click the Add Placement button.
Note: While Unity Ads automatically creates “default” placements when first creating your project, we recommend creating new unique placements for each AdMob mediation configuration.
Step 3. Retrieve your credentials
In addition to the Game ID and Placement ID, you also need your Unity Ads API Key and Organization core ID for setting up your AdMob ad unit ID:
Navigate to Set up > API Management and take note of the Monetization Stats API Access Key.
Then, navigate to Organization settings and take note of the Organization core ID.
Configure Unity Ads’ Parameters into ironSource Account
Once you have all of these parameters, log in to your ironSource account.
-
Go to ‘Monetize‘ ➣ ‘SDK Networks‘ ➣ ‘Available Networks‘.
- Select UnityAds from the list of available Ad Networks and input the UnityAds ‘API Key‘ and Organizational ID in the relevant fields.
- Make sure you choose the app you want to integrate from the apps list on the left side of the SDK networks page.
- Click on the unity ads’ Setup button and enter the ‘Game ID‘ and ‘Placement ID‘ under the relevant Ad Unit Settings:
- You will then see Unity Ads as Active for Mediation on your Setup Dashboard.
Step 4. Add the Unity Ads Adapter to Your Build
Adobe Air Plugin
- Download the Unity Ads ANE:
Add the Unity Ads Adobe Native Extension (ANE) to your build. You can find the latest Unity Ads ANE for Unity LevelPlay here.
Important! Make sure you download both Adapter and SDK files. - Add the Unity Ads ANE to your Project:
To add the ANE, simply add it to your project by clicking on project Properties ➣ Flex build path ➣ Native Extension tab. Click on ‘Add ANE’ and choose the file you downloaded in the previous step. Make sure you mark the ANE to be packaged into your application on Flex Build Packaging ➣ Native Extension Tab and check the ‘Package‘ checkbox. - Make sure to add the following extensions, for Android and iOS:
<extensionID>com.ironsource.adobeair.unityads</extensionID> <extensionID>com.ironsource.adobeair.unityadssdk</extensionID>
- For Android Only – Update AndroidManifest.xml:
As of Unity Ads Android adapter version 4.3.4+ (Android SDK Version 6.17.0), Unity Ads adapter will be released as AAR. Only if you intend to keep your Jar integration, please add the manifest.
<activity android:name="com.unity3d.services.ads.adunit.AdUnitActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:hardwareAccelerated="true" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" /> <activity android:name="com.unity3d.services.ads.adunit.AdUnitTransparentActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:hardwareAccelerated="true" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" /> <activity android:name="com.unity3d.services.ads.adunit.AdUnitTransparentSoftwareActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:hardwareAccelerated="false" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" /> <activity android:name="com.unity3d.services.ads.adunit.AdUnitSoftwareActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:hardwareAccelerated="false" android:theme="@android:style/Theme.NoTitleBar.Fullscreen" />
Done!
You are now all set to deliver Unity Ads ads within your application!
What’s Next?
To leverage additional ad networks through ironSource Mediation, integrate the adapters and follow our integration guides