Getting Started with Unity SDK
This guide is for publishers who want to monetize a Unity game on Android and iOS with Empower Mobile Ads SDK.
Current package version: 1.2.4 (native Android SDK 5.9.19, native iOS SDK 9.9.0)
Overview
The Unity package is a C# wrapper over the native Empower Mobile Ads SDKs. You call one static class, EmpowerAds, on both platforms. Through intelligent mediation, the SDK automatically selects and serves the optimal ad from multiple premium ad networks.
Supported Ad Formats
After completing the integration, you will be able to display the following ad formats:
| Format | Description |
|---|---|
| Banner Ads | Rectangular ads shown on top of the Unity view. |
| Interstitial Ads | Full-screen ads that cover the entire interface until closed by the user. Ideal for natural transition points. |
| Rewarded Ads | Full-screen video ads that users can opt to watch in exchange for in-game rewards. |
| App Open Ads | Full-screen ads displayed when users bring your game to the foreground. |
| Preroll Ads | Video ads played before your own video content. |
Quick Start
Initialize the SDK, load an ad when the SDK is ready, and show it:
using Empower.MobileAds;
using UnityEngine;
public class AdsBootstrap : MonoBehaviour
{
void Start()
{
EmpowerAds.OnSdkReady += HandleSdkReady;
EmpowerAds.Initialize(new EmpowerAdsConfig(
android: "YOUR_ANDROID_APP_AD_IDENTIFIER",
iOS: "YOUR_IOS_APP_AD_IDENTIFIER"));
}
void OnDestroy()
{
EmpowerAds.OnSdkReady -= HandleSdkReady;
}
private void HandleSdkReady()
{
EmpowerAds.LoadInterstitialAd("YOUR_INTERSTITIAL_ZONE_ID");
}
// Call this at a natural break point.
public void ShowInterstitial()
{
EmpowerAds.ShowInterstitial("YOUR_INTERSTITIAL_ZONE_ID");
}
}
Ads do not load in the Unity Editor. Test on an Android or iOS device.
Integration Workflow
To integrate the Empower Mobile Ads SDK into your Unity game, follow these steps:
- Prerequisites - Ensure your development environment meets the minimum requirements
- Integration - Install the package and configure the Android and iOS builds
- Privacy & Consent - Handle user consent with the built-in flow
- Configuration - Initialize the SDK with your app identifiers
- Ad Types - Implement banner, interstitial, rewarded, app open, or preroll ads in your game
- Advanced Settings - Optional features such as impression level revenue
What You'll Need
Before you begin, make sure you have:
- Your unique App Ad Identifier for each platform (provided by Empower)
- Zone IDs for each ad placement (provided by Empower)
If you don't have this information, contact your Empower account manager.