How can I check banner ad is loaded and is displaying or not

Hello unity users,

I am using Google Admob in my game. The banner ad is showing successfully in my game.
I am displaying banner at the top of the screen. Now my requirement is how can I check the banner is displaying to the user or not.
How can I achieve this type of functionality.

Here is my code for display banner.

using UnityEngine;
using System.Collections;
using GoogleMobileAds;
using GoogleMobileAds.Api;

public class AdTop : MonoBehaviour {

public BannerView bannerView;

void Awake () 
{
	if (PlayerPrefs.GetInt ("Ad") != 1) {
		bannerView = new BannerView ("ca-app-pub-6996012155310080/6632284250", AdSize.SmartBanner, AdPosition.Top);
		AdRequest request = new AdRequest.Builder ().Build ();
	        bannerView.LoadAd (request);
	}
}
}

Can anyone help me…?

My triggers are set to LT 9AXIS and RT 10AXIS and they don't work. Sometimes RT trigers LT.

My right trigger is set to the 10th axis but still doesnt work.

1 Answer

1

hii…

you will be having ad events.

    public void HandleAdLoaded(object sender, EventArgs args)
    {
        print("HandleAdLoaded event received.");
    }

This will handle your event . you can check here ad is loaded or not.

Its give "EventArgs does not exist in current context" error