- Home /
The question is answered, right answer was accepted
Google Mobile Ads not playing
So i'm getting ready to release my app to the play store and I got everything setup Google Play Services and Mobile Ads. I follow the instructions perfectly and I get NO errors. I only have one ad and its set to run every time the player completes 3 rounds in the game, however, nothing appears when I try testing it.
Something people are probably gonna ask
1. Yes it in an alpha track and my gmail is on the list of testers.
2. Yes my Ad Unit id is correct
3. Yes I am loading the ad before showing it.
4. Yes my build target is android.
if I've missed something important let me know, I know the code is a mess but i'll refactor it when the ads are working ;p
//Called in start
void AdServicesSetup()
{
#if UNITY_ANDROID
string appId = "App id";
#endif
MobileAds.Initialize(appId);
mainAd = new InterstitialAd("Ad Id");
AdRequest request = new AdRequest.Builder().Build();
mainAd.LoadAd(request);
}
//Called when the round ends
public void GameEnd()
{
_gameOverPanel.SetActive(true);
_rounds++;
Social.ReportScore(_spawner.spawnedCubes, GPGSIds.leaderboard_most_cubes_stacked, success => {});
if(_rounds == 3)
{
if(mainAd.IsLoaded())
{
mainAd.Show();
_rounds = 0;
}
else
{
Debug.Log("Ad is not loaded");
}
}
_isRunning = false;
_spawner.StopSpawning();
_platform.enabled = false;
}
Answer by Trevdevs · Aug 11, 2018 at 03:32 PM
Figured it out myself didn't import a certain folder i needed from the package
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Admob ads not showing when using Unity 2018 0 Answers
I have question about Unity Ads 1 Answer
How do I delay an Ad? 2 Answers