An advertisement from admob shows in my android app every time the user loses. However I want it to appear after the loss once every 2 loses. E.g i died and the ad showed the next time i died it didnt show after that it showed and so on. It takes a gap and then shows again after.
//Setting up the ad
InterstitialAd interstitial;
private void RequestInterstitial()
{
#if UNITY_ANDROID
string adUnitId = "ca-app-pub-5920324855307233/4763839506";
#elif UNITY_IPHONE
string adUnitId = "ca-app-pub-5920324855307233/4763839506";
#else
string adUnitId = "unexpected_platform";
#endif
// Initialize an 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);
}
void Start(){
RequestInterstitial();
}
void Update(){
if (interstitial.IsLoaded()) {
interstitial.Show();
}
}