Advertisement
Guest User

Interstitial

a guest
Feb 1st, 2015
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.58 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using GoogleMobileAds.Api;
  4.  
  5. public class Interstitial : MonoBehaviour {
  6.  
  7.     // Use this for initialization
  8.     void Start () {
  9.         // Initialize an InterstitialAd.
  10.         InterstitialAd interstitial = new InterstitialAd("MY_AD_UNIT_ID");
  11.         // Create an empty ad request.
  12.         AdRequest request = new AdRequest.Builder().Build();
  13.         // Load the interstitial with the request.
  14.         interstitial.LoadAd(request);
  15.         if (interstitial.IsLoaded())
  16.         {
  17.             interstitial.Show();
  18.         }
  19.    
  20.     }
  21.    
  22.    
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement