- Home /
Question by
hellojbb1234 · Jan 17, 2017 at 08:18 AM ·
admobsdk
Why cant I put ads in my game?
Ads seems to be a little stubborn for adMob they wont show up in my game for some reason.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using GoogleMobileAds.Api;
public class GoogleAD : MonoBehaviour {
public static GoogleAD Instance { set; get; }
BannerView bannerView;
private void RequestBanner()
{
string adUnitId = "adIDnotputting it here ";
// Create a 320x50 banner at the top of the screen.
bannerView = new BannerView(adUnitId, AdSize.SmartBanner, AdPosition.Top);
// Create an empty ad request.
AdRequest request = new AdRequest.Builder().Build();
// Load the banner with the request.
bannerView.LoadAd(request);
}
public void ShowBanner()
{
bannerView.Show();
}
}
Comment
i have the same problem did you find any solution @ hellojbb1234