I am trying to implement banner ads into my unity game using Google AdMob. I have searched lots of solutions but no one makes a banner show up during the gameplay. Can someone help me please? I will leave the code bellow:
`
[SerializeField] private string apId = "";
[SerializeField] private string bannerId = "";
BannerView banner;
// Use this for initialization
void Start () {
MobileAds.Initialize(apId);
ShowBanner();
}
public void ShowBanner()
{
banner = new BannerView(bannerId, AdSize.Banner, AdPosition.Top);
AdRequest request = new AdRequest.Builder().Build();
banner.LoadAd(request);
}`
↧