Interstitial Ad
1. Basic requirements
Add ADX Unity SDK to your project.
Use the Ad Unit ID issued for Banner Ads.
Before requesting an ad, SDK initialization must be done first.
SDK initialization should be called only once when the app launches and ad requests should be made after SDK initialization is complete.
2. Implementation
If the app is distributed on both Android and iOS, enter the Ad Unit ID issued for each platform.
Instantiate
AdxInterstitialAdand register the required callbacks.Call
Load()to load the ad.When disposing of the ad object, call
Destroy().
#if UNITY_ANDROID
string adxInterstitialAdUnitId = "<ANDROID_ADX_INTERSTITIAL_AD_UNIT_ID>";
#elif UNITY_IOS
string adxInterstitialAdUnitId = "<IOS_ADX_INTERSTITIAL_AD_UNIT_ID>";
#endif
void LoadInterstitialAd()
{
if (interstitialAd == null)
{
interstitialAd = new AdxInterstitialAd(adxInterstitialAdUnitId);
interstitialAd.OnAdLoaded += InterstitialAd_OnAdLoaded;
interstitialAd.OnAdFailedToLoad += InterstitialAd_OnAdFailedToLoad;
interstitialAd.OnAdClicked += InterstitialAd_OnAdClicked;
interstitialAd.OnAdShown += InterstitialAd_OnAdShown;
interstitialAd.OnAdClosed += InterstitialAd_OnAdClosed;
interstitialAd.OnAdFailedToShow += InterstitialAd_OnAdFailedToShow;
}
interstitialAd.Load();
}
Check whether an ad is available using
IsLoaded(), and if so, display the ad withShow().
When disposing of the ad object, call
Destroy()
3. Callback
You can receive specific events. Please implement them as needed.
4. Ad Revenue (OnPaidEvent)
You can check the estimated ad revenue for ad impressions.
Last updated
Was this helpful?