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

Admob interstitial ad are slowing my game down

$
0
0
In my android game I have an admob interstitial ad that appears when the player dies. However during gameplay on a mobile device there are random but extreme delays when playing. The ad is requested and called in the start method: public void Start(){ // Initialize an InterstitialAd. interstitial = new InterstitialAd("ca-app-pub-3940256099942544/1033173712"); // Create an empty ad request. AdRequest request = new AdRequest.Builder().Build(); // Load the interstitial with the request. interstitial.LoadAd(request); } Then the ad is shown when the player loses at the end of the game. if(playerB.isDead == true) { if (interstitial.IsLoaded()) { interstitial.Show(); } } The game is restarted by reloading the level using `Application.LoadLevel()` I think the issue is caused by requesting the ad when the game starts. Is there any solution to this or more efficient way to call the ad?

Viewing all articles
Browse latest Browse all 1416

Trending Articles



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