So I made a dice app with unity and I am trying to display a banner at the bottom.
It used to work fine until an update that had nothing to do with the ad and then the ad started disapearing when I touch the screen, here’s a 10 second video of the disappearing ad: Banner disappearing - YouTube
And here’s the code for the advertisment
private BannerView bannerView;
void Start()
{
string appId = "...";
MobileAds.Initialize(appId);
RequestBanner();
}
private void RequestBanner()
{
#if UNITY_ANDROID
string adUnitId = "...";
#elif UNITY_IPHONE
string adUnitId = "...";
#else
string adUnitId = "unexpected_platform";
#endif
// Create a 320x50 banner at the top of the screen.
bannerView = new BannerView(adUnitId, AdSize.SmartBanner, AdPosition.Bottom);
// Create an empty ad request.
AdRequest request = new AdRequest.Builder().Build();
// Load the banner with the request.
bannerView.OnAdLoaded += HandleOnAdLoaded;
bannerView.LoadAd(request);
}
public void HandleOnAdLoaded(object sender, EventArgs args)
{
bannerView.Show();
}