Hey EveryOne…I have a problem with Unity Ads Test ads are Working Fine in my apk but Real Ads are not Showing…i tried all the things shown in the forums…In my apk built i only see unity test ads.
Settings i have done :
In the Dashboard my “Override Client Test Mode” to “ON”
The radio button for “Force test mode OFF (i.e. use production ads) for all devices”
First i have this Force test mode On for testing ads on my device but when i turn it Off once i have seen real add in my apk but after that Force Test Mode is being off i have not showing my real ads only unity test ads are showing.
3.In unity Services tab, Test mode Enabled i tried both enabling and disabling this check box nothing happens.
What should i do Please suggest anyone i have search for this at many places…
Note :Both the playstore and apple IDS i have written Right
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Advertisements;
public class UnityADs : MonoBehaviour
{
public static UnityADs Instance;
private string playstoreid = "XXXXXXX";
private string appleid = "XXXXXXX";
private string InsterstialAd = "video";
private string RewardedAd = "rewardedVideo";
private string BannerAd = "banner";
public bool isTargetedPlayStore;
public bool isTestAds;
// Start is called before the first frame update
void Start()
{
Instance = this;
InitialiseAdvertisement();
StartCoroutine(ShowBannerWhenReady());
}
// Update is called once per frame
public void InitialiseAdvertisement()
{
if (isTargetedPlayStore) { Advertisement.Initialize(playstoreid, isTestAds);return; }
Advertisement.Initialize(appleid , isTestAds);
}
public void adshower()
{
if (!Advertisement.IsReady(InsterstialAd)) { return; }
Advertisement.Show(InsterstialAd);
}
IEnumerator ShowBannerWhenReady()
{
while (!Advertisement.IsReady(BannerAd))
{
yield return new WaitForSeconds(0.5f);
}
Advertisement.Banner.SetPosition(BannerPosition.BOTTOM_CENTER);
Advertisement.Banner.Show(BannerAd);
}
}
@NINADHAJARE I just responded to you in another thread but I’ll put it here as well
Check your UnityADs object in the Unity Editor. It could be your “isTestAds” public variable is still set to true. You may also have your device registered as a test device on the dashboard - if this is the case then that device will always receive test ads, regardless of any other settings.
Sadly this is a very common mistake. There are two different ways you can disable testMode in your application.
The first method will require you to do another build, to do this you must locate the testMode toggle in the services window and disable it, then you must pass through the false boolean for testMode in your Advertisement.Intitialize() function. Also if your testMode variable is a public variable, or serializable, ensure that it is also set to false in the inspector panel.
The second method will not require you to do a new build however it will disable testMode regardless of what boolean you pass to the SDK. To do this you will need to go to your project in your Unity Dashboard > Project Settings > TestMode, set this to ‘Override Client Test Mode’ and then ‘Force Test Mode OFF’. This will force testMode off on all builds of your app regardless of the settings in your code.
I hope this helps, if you need anything else please let me know.