Hello everyone,
I have made a game, and decided to test the in-game ads, using the official GoogleMobileAdsPlugin, from this link: https://developers.google.com/mobile-ads-sdk/docs/games. And as far as i can tell, I have followed all the instructions, but when i pres Play all I get are debug.log messages and nothing else.
Created DummyClient
UnityEngine.Debug:Log(Object)
Dummy CreateBannerView
UnityEngine.Debug:Log(Object)
Dummy LoadAd
UnityEngine.Debug:Log(Object)
The code im using to call the ad:
using UnityEngine;
using System.Collections;
using GoogleMobileAds;
using GoogleMobileAds.Api;
public class CallAd : MonoBehaviour {
void Start ()
{
RequestBannerEMPTY();
RequestBannerTEST();
}
private void RequestBannerEMPTY()
{
#if UNITY_EDITOR
string adUnitId = " my-id ";
#elif UNITY_ANDROID
string adUnitId = " my-id ";
#elif UNITY_IPHONE
string adUnitId = "INSERT_IOS_BANNER_AD_UNIT_ID_HERE";
#else
string adUnitId = "unexpected_platform";
#endif
BannerView bannerView = new BannerView(adUnitId, AdSize.Banner, AdPosition.Top);
AdRequest request = new AdRequest.Builder().Build();
bannerView.LoadAd(request);
}
private void RequestBannerTEST()
{
#if UNITY_EDITOR
string adUnitId = " my-id ";
#elif UNITY_ANDROID
string adUnitId = " my-id ";
#elif UNITY_IPHONE
string adUnitId = "INSERT_IOS_BANNER_AD_UNIT_ID_HERE";
#else
string adUnitId = "unexpected_platform";
#endif
BannerView bannerView = new BannerView(adUnitId, AdSize.Banner, AdPosition.Top);
AdRequest request = new AdRequest.Builder()
.AddTestDevice(AdRequest.TestDeviceSimulator) // Simulator.
.AddTestDevice(" my-id ") // Test Device 1.
.Build();
bannerView.LoadAd(request);
}
}
From Both functions i get the same result, even if i use my real or fake ID. I must be missing something, can anyone help me?
Now I have done much experimenting with unity 4 and 5, updating everything i can, and now my Eclipse is not working
This Android SDK requires Android Developer Toolkit version 23.0.0 or above.
Could not update it with "Install new soft..." even when downloaded the zip.
Ofc LogCat is not working aswell, but even before all this i couldnt get the ads to show.
Do I need to register at Admob? Is it necessary if i got my Id from Eclipse?
I can try to give more info if anyone has any idea where I messed up.
Many thanks!
↧