Quantcast
Channel: Questions in topic: "ads"
Viewing all articles
Browse latest Browse all 1416

ADMob ads no show

$
0
0
**I'm having a annoying problem, I'm trying to call the Interstitial Ad after clicking on the home screen button, but an advertisement does not open (I tried right by android and it did not load) Is there any method missing?** using System.Collections; using System.Collections.Generic; using GoogleMobileAds.Api; using UnityEngine; using UnityEngine.SceneManagement; public class comandosBasico : MonoBehaviour { public void carregaCena(string nomeCena) { #if UNITY_ANDROID string adUnitId = "ca-app-pub-4887096828380218/5757046491"; #elif UNITY_IPHONE string adUnitId = "INSERT_IOS_INTERSTITIAL_AD_UNIT_ID_HERE"; #else string adUnitId = "unexpected_platform"; #endif // Initialize an InterstitialAd. InterstitialAd interstitial = new InterstitialAd(adUnitId); // 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(); } SceneManager.LoadScene(nomeCena); } } ![alt text][1] [1]: /storage/temp/101341-sem-titulo.png

Viewing all articles
Browse latest Browse all 1416

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>