I have been trying since 2 days to figure out why on earth is admob just showing the TestAds! When i use testId it show test ads. When i use my admob banner id it becomes blank(no ads shown) Below ive attached my admob banner code.
using UnityEngine;
using System.Collections;
using GoogleMobileAds.Api;
public class AdmobScript : MonoBehaviour
{
public string BannerId;
// Use this for initialization
void Start()
{
//Request Ads
RequestBanner();
}
private void RequestBanner()
{
#if UNITY_EDITOR
string adUnitId = "unused";
#elif UNITY_ANDROID
string adUnitId = "ca-app-pub-xxxxxxxxxxxxxxxxxxx";
#elif UNITY_IPHONE
string adUnitId = "INSERT_IOS_BANNER_AD_UNIT_ID_HERE";
#else
string adUnitId = "unexpected_platform";
#endif
// Create a 320x50 banner at the bottom of the screen.
BannerView bannerView = new BannerView(adUnitId, AdSize.Banner, AdPosition.Bottom);
// Create an empty ad request.
AdRequest request = new AdRequest.Builder().Build();
// Load the banner with the request.
bannerView.LoadAd(request);
}
}
I tried to research on why it aint working but unfortunately there are very less unity related admob solutions available on the internet.
Google Mobile Ads Plugin v3.13.1
Unity 2017.4.0f1
Please help me out! Thanks!