0

I'm having problems with google play because I have google admob with interstitials.

I have to implement this http://developer.android.com/google/play-services/id.html#get_started in unity, but I'm not sure how to do it.

Here is my code where I request the Add:

void Start () {     
    // Initialize an InterstitialAd.
    interstitial = new InterstitialAd("ca-app-pub-2682144290513842/3941226367");
    // Create an empty ad request.
    request = new AdRequest.Builder().Build();
    // Load the interstitial with the request.
    interstitial.LoadAd(request);
}

void showAdd(){
    if(Random.Range(0,5)>3){
        if (interstitial.IsLoaded()) {
            interstitial.Show();
        }
    }
}

Any idea?

Daniel Storm
  • 18,301
  • 9
  • 84
  • 152

0 Answers0