Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using GoogleMobileAds.Api;
- public class Interstitial : MonoBehaviour {
- // Use this for initialization
- void Start () {
- // Initialize an InterstitialAd.
- InterstitialAd interstitial = new InterstitialAd("MY_AD_UNIT_ID");
- // Create an empty ad request.
- AdRequest request = new AdRequest.Builder().Build();
- // Load the interstitial with the request.
- interstitial.LoadAd(request);
- if (interstitial.IsLoaded())
- {
- interstitial.Show();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement