What do you mean by “stopped working”? Could it simply be that you have watched too many ads on that device and exceeded limit: Frequently asked questions
What I meant by stopped working was basically the isReady function started returning false on isReady quite often.
That definitely makes a lot of sense, but I don’t think I had ever quite hit 25 ads and it stopped working. However, I do filter out to make sure the only ads that play are E for Everyone. Which would explain why it seems like it starts working again every now and then.
However, while watching a friend play he did get the same ad a couple times within the same hour. Are there exceptions to that rule sometimes? Or maybe it was all in my head. Regardless, that is probably what I am experiencing. Thank you so much for your help
Go to Windows → package manager → ads, then select the latest version of it and then update.
Go to the asset store and import the “Unity monetization” by Unity Technology
For the script, in the start method, you need to initialize your game ID for the platform you want (Android/Ios).
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Advertisements; //include ads lib
public class AdManager : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
Advertisement.Initialize("123456", true); //this is Android/Ios gameID example. "true" is in the test mode, need to change it if it is not in a test mode
}
// Click a button to show ads
public void showAd()
{
if(Advertisement.IsReady("gameAd")) //gameAd is the placement name.
Advertisement.Show("gameAd");
else //for debugging purposes, should remove this else
Debug.Log("Ad is not ready");
}
}```
@sidangusf It sounds like you’re saying we should install both ads from package manager and Unity Monetization from Asset Store. But the description of Unity Monetization explicitly says “Most importantly, you should not install using both the Asset Store and Package Manager as it can cause errors.”
With that said, I’m facing the same problem. Ad not ready in test mode. It was fine until now.
Can you create a new forum thread and provide as much detail as possible, specifically which version of the Ads SDK you’re using, your Unity version, and an example of your ad integration.