- Home /
UnityAds only showing test mode ads and no statistics
Hi I've implemented the unity ads in my latest game and it is live on the appstore link: https://itunes.apple.com/us/app/target-36/id991261199?ls=1&mt=8
but what i'm getting is its only showing the unity test ads not the production ads i'm not getting any statistics also. here is the script that i've using to show the unity ads.
Ads will show every third time your game is over please help me
using UnityEngine; using System.Collections; using UnityEngine.Advertisements;
public class AdManager : MonoBehaviour { [SerializeField] string gameID = "38220";
void Awake()
{
Advertisement.Initialize (gameID, true);
}
public void ShowAd(string zone = "")
{
#if UNITY_EDITOR
StartCoroutine(WaitForAd ());
#endif
if (string.Equals (zone, ""))
zone = null;
ShowOptions options = new ShowOptions ();
options.resultCallback = AdCallbackhandler;
if (Advertisement.isReady (zone))
Advertisement.Show (zone, options);
}
void AdCallbackhandler (ShowResult result)
{
switch(result)
{
case ShowResult.Finished:
Debug.Log ("Ad Finished. Rewarding player...");
break;
case ShowResult.Skipped:
Debug.Log ("Ad skipped. Son, I am dissapointed in you");
break;
case ShowResult.Failed:
Debug.Log("I swear this has never happened to me before");
break;
}
}
IEnumerator WaitForAd()
{
float currentTimeScale = Time.timeScale;
Time.timeScale = 0f;
yield return null;
while (Advertisement.isShowing)
yield return null;
Time.timeScale = currentTimeScale;
}
}
Answer by HeikkiTunkelo · Jun 01, 2015 at 03:51 PM
The second parameter on the initialization controls the test mode:
void Awake()
{
Advertisement.Initialize (gameID, true);
}
You can control the test mode in three ways:
You initialize ads in your game with testmode parameter (which you have done) => This will show test ads in all devices for testing purposes
You can override this (never show test-ads or always show test ads) in Unity Ads admin
Or you can show test-ads to specific devices
You can control the options 2 & 3 here: (go to games -> Click on your game -> Monetization settings -> Advanced settings -> Ad Test mode
What you should do now is: Go to your UnityAds account and select "Force Off" option in the Ad Test mode. The value should be updated to the ad-delivery within 15 minutes.
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Unity ads are working in editor but not on android device 2 Answers