unity – AdMob interstitial adverts not exhibiting after publishing in playstore

unity – AdMob interstitial adverts not exhibiting after publishing in playstore

[ad_1]

unity – AdMob interstitial adverts not exhibiting after publishing in playstore – Sport Improvement Stack Alternate







Sport Improvement Stack Alternate is a query and reply website for skilled and impartial recreation builders. It solely takes a minute to enroll.

Signal as much as be a part of this neighborhood

Anyone can ask a query

Anyone can reply

The perfect solutions are voted up and rise to the highest

Requested

Considered
2k occasions

$begingroup$

I’ve create a Unity recreation, 1st I add an AdMob interstitial adverts script on recreation object then strive on my fundamental digital camera after I check in my cellular earlier than publishing. It has labored like actual time adverts and mistakenly clicked it and earn 0.3 so I create new advert unit positioned it on my recreation then revealed my recreation. However the adverts will not be exhibiting in actual time. No error was present in AdMob however 147 advert requests are proven in AdMob and adverts will not be seen when my recreation 1st scene opens.

Right here is my interstitial adverts script code:

utilizing UnityEngine;
utilizing System.Collections;
utilizing GoogleMobileAds.Api;

public class AdmobScript : MonoBehaviour
{
   personal InterstitialAd interstitial;

   personal void RequestInterstitial()
   {
      #if UNITY_ANDROID
         string adUnitId = "ca-app-pub-3129337025883034/9036322***";
      #elif UNITY_IPHONE
         string adUnitId = "INSERT_IOS_INTERSTITIAL_AD_UNIT_ID_HERE";
      #else
         string adUnitId = "unexpected_platform";
      #endif

      // Create an interstitial.
      this.interstitial = new InterstitialAd(adUnitId);
      // Load an interstitial advert.
      this.interstitial.LoadAd(this.CreateAdRequest());
   }

   // Returns an advert request
   personal AdRequest CreateAdRequest()
   {
      return new AdRequest.Builder().Construct();
   }

   personal void ShowInterstitial()
   {
      if (interstitial.IsLoaded())
      {
         interstitial.Present();
      }
   }

   public void Begin()
   {
      RequestInterstitial();
   }

   void Gameover()
   {
      if(interstitial.isloaded){
        ShowInterstitial();
      }
   }
}

$endgroup$

1

lang-cs

 

[ad_2]

Comments

No comments yet. Why don’t you start the discussion?

Leave a Reply

Scroll to Top