I have used the following code to put banner ads on my unity game but my ads are not showing neither the test ads nor the actual admob ads.I have no idea of whats going on i have completed my payment details in admob as well.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GoogleMobileAds.Api;
public class AdmobScript : MonoBehaviour
{
public string BannerId;
void Start()
{
RequestBanner();
}
private void RequestBanner()
{
#if UNITY_EDITOR
string adUnitId = "unused";
#elif UNITY_ANDROID
string adUnitId = BannerId;
#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);
}
}