- Home /
Admob script help
I have an admob script and it shows (dummy.loadad) but it doesnt show actual ads in game so i know i did something wrong. In admob website the ad i want to show is called interstitialA60 (not 60interstitialA, changed it). What do i need to do to fix this?
Regular ad is the interstitial
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GoogleMobileAds.Api;
public class Ads60 : MonoBehaviour
{
private BannerView bannerView;
[SerializeField] private string appID = "";
[SerializeField] private string bannerID = "";
[SerializeField] private string regularAD60 = "";
private void Awake()
{
MobileAds.Initialize(appID);
}
public void OnClickShowBanner()
{
this.RequestBanner();
}
public void OnClickShowAd60()
{
this.RequestRegularAd();
}
private void RequestRegularAd()
{
InterstitialAd AD = new InterstitialAd(regularAD60);
AdRequest request = new AdRequest.Builder().Build();
AD.LoadAd(request);
}
private void RequestBanner()
{
bannerView = new BannerView(bannerID, AdSize.Banner, AdPosition.Bottom);
AdRequest request = new AdRequest.Builder().Build();
bannerView.LoadAd(request);
}
}
admob.png
(21.1 kB)
Comment
Your answer
Follow this Question
Related Questions
How do I delay an Ad? 2 Answers
Multiple Cars not working 1 Answer
AdMob Rewarded Video Ad 0 Answers
Banner AdMob is not showing on Android 1 Answer
Distribute terrain in zones 3 Answers