Quantcast
Channel: Questions in topic: "ios"
Viewing all articles
Browse latest Browse all 4709

Unity Ads Stop Playing On Mobile

$
0
0
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

Viewing all articles
Browse latest Browse all 4709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>