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…?
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.