Unity Ads Stop Playing On Mobile
Hi There,
I am using Unity 5.6 with Unity's build in Ads Service. I am consistently running into the issue that when I publish my build on iOS, the ads will trigger and play perfectly fine a handful of times. Then they stop playing completely. It seems as if the Advertisement.IsReady() is returning false to cause this, but I am unsure as to why.
Here is my code:
public void ShowRewardAd()
{
if(Advertisement.IsReady("rewardedVideo"))
{
scr_AudioManager.m_instance.PlaySFX(scr_AudioManager.m_instance.m_uiSelect);
scr_PlayerPref_Manager.m_instance.SaveNumberOfRevives(scr_PlayerPref_Manager.m_instance.LoadNumberOfRevives() + 1);
var options = new ShowOptions { resultCallback = HandleShowResult };
bUpdateSlider = false;
Advertisement.Show("rewardedVideo", options);
}
}
private void HandleShowResult(ShowResult result)
{
switch(result)
{
case ShowResult.Finished:
Debug.Log("The ad was successfully shown");
scr_GameState.m_instance.Revive();
Destroy(this.gameObject);
break;
case ShowResult.Skipped:
Debug.Log("the ad was skipped");
break;
case ShowResult.Failed:
Debug.LogError("the ad failed");
break;
}
}
Again, every time I publish the game to the App Store and download, the ads will play as intended about 4 or 5 times. Then they stop playing completely.
Any help figuring this out would be greatly appreciated.
Thanks a lot,
Eric
Your answer
Follow this Question
Related Questions
Unity Advertisement isn´t existing? 0 Answers
exception for pause 1 Answer
I can get unity ads to work can someone help 0 Answers
AdMob ads not showing into unity game! Please help... 2 Answers
can i use admob ads with unity ads in Unity3d Game? 0 Answers