Hello Unity3D Community,
First off, my problem is similar to this post: Banner ad not working by @stinkyboy
However, it lacks information and has also so far received no helpful (or any at all) comments or answers, so let me try this as well:
TL;DR
I’ve implemented Unity Monetization according to the Integration guide and in test mode, everything is working fine, but switching test mode off will make the banner not appear at all while the (rewarded) video advertisement is still working correctly and showing real ads. Is there a way to fix this? I need to make sure that when that build goes live in the iTunes and Playstore that the Monetization is working.
The Issue:
For a current project (Android + iOS App) I’ve been trying to get advertisements for monetization,
I’ve followed the instructions here: Integration guide for Unity
And was able to successfully implement the two types I wanted:
- A rewarded video ad
- A permanent banner ad
Which work fine in test mode.
However, if I disable test mode, compile my app and install it on my (android) smartphone, it’s not showing the banner. The Reward video works fine, but the banner is nowhere to be seen.
Current Implementation:
I have downloaded and imported the entirety of the Unity Monetization 3.1.0 SDK from the Asset Store.
At the beginning of my main script (singleton), I make sure to import the Advertisement API:
using UnityEngine.Advertisements;
_
And to distinguish between iOS and Android I run this logic:
// Monetization vars
#if UNITY_IOS
private string gameID = "[redacted]";
#elif UNITY_ANDROID
private string gameID = "[redacted]";
(the [redacted] values are obviously my proper project id’s for the unity advertisement project)
_
Then in Start(), I try to show the banner ad:
// Check if there's currently a valid gameID in use and initialize the bottom ad banner
if (gameID != null)
{
Advertisement.Initialize(gameID, gameTestmode);
StartCoroutine(ShowBannerWhenReady());
}
_
My coroutine for the banner placement looks as follows:
// Banner advertisement
IEnumerator ShowBannerWhenReady()
{
while (!Advertisement.IsReady("BottomAds"))
{
yield return new WaitForSeconds(0.5f);
}
Advertisement.Banner.Show("BottomAds");
}
_
And this works! At least when being in test mode, but once I turn test mode off everywhere, compile and install/run it on my smartphone it’s just not showing up.
I’ve also made sure that:
- Unity Ads is “ON” in the Services Window of Unity (and the proper project is hooked to it)
- Unity Ads Service “Enable test mode” is off / unchecked
- Enable built-in Ads extension is also off (otherwise Gradle will have lots of duplicate classes due to the asset store plugin being installed)
- In my project settings via operate.dashboard.unity3d.com I’ve set the test mode to FORCE OFF for both platforms
- I wait after starting my App to give Unity ads a bit of time to prepare and cache the banner before showing it
- My Smartphone has an internet connection
- Everything is up-to-date (using Unity 2019.1.0f2 and Unity Monetization SDK 3.1.0)
_
So yeah I am kind of at the end of my wits, I hope anyone can help me figure this out or explain what is going on, also: let me know if there’s anything else I should provide.
Thanks in advance!