- Home /
Admob interstitial ad are slowing my game down
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?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612103900im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Game crashes on player death 0 Answers
can you please write rewarded ad script 0 Answers
Test Ads Not Showing on Android Device 3 Answers
admob related question 2 Answers