Beispiel #1
0
 // UnityAds
 public void ShowInterstitialAd()
 {
     if (!adMobAds.IsInterstitialReady() && !unityAds.IsInterstitialReady())
     {
         Debug.Log("no Interstitial ad was ready");
     }
     else if (!adMobAds.IsInterstitialReady() && unityAds.IsInterstitialReady())
     {
         unityAds.ShowInterstitial();
     }
     else if (adMobAds.IsInterstitialReady() && !unityAds.IsInterstitialReady())
     {
         adMobAds.ShowInterstitial();
     }
     else
     {
         if (Random.Range(0, 10) > 4)
         {
             unityAds.ShowInterstitial();
         }
         else
         {
             // Admob Banner
             adMobAds.ShowInterstitial();
         }
     }
 }