Admob Work Only In empty project But Not in My Game...!!
Hello I Have a Strange problem with admob is work in empty project (i attach the The Script with main camera is Work in real device) But if i attach script with main camera of my game... admob not work Plaise help me and sorry for my english (i follow this tuto https://www.youtube.com/watch?v=5OLp5NafqK0)
using UnityEngine;
using System.Collections;
using GoogleMobileAds.Api;
public class LoadAd : MonoBehaviour {
// Use this for initialization
void Start ()
{
RequestBanner();
}
// Update is called once per frame
void Update ()
{
}
private void RequestBanner()
{
#if UNITY_ANDROID
string adUnitId = "ca-app-pub-3940256099942544/6300978111";
#elif UNITY_IPHONE
string adUnitId = "INSERT_IOS_BANNER_AD_UNIT_ID_HERE";
#else
string adUnitId = "unexpected_platform";
#endif
// Create a 320x50 banner at the top of the screen.
BannerView bannerView = new BannerView(adUnitId, AdSize.SmartBanner, AdPosition.Bottom);
// Create an empty ad request.
AdRequest request = new AdRequest.Builder().Build();
// Load the banner with the request.
bannerView.LoadAd(request);
}
}
Comment