Quantcast
Channel: Questions in topic: "ads"
Viewing all articles
Browse latest Browse all 1416

Ads video always fail to show

$
0
0
I have this code and after i execute it with a button console everytime prints out that video failed to show. maybe i just don't know how to enable ads in the unity. i have test mode enabled. this is my code. : private string gameId = "1523603"; void Start(){ Advertisement.Initialize (gameId); } public void ShowAd () { var options = new ShowOptions(); options.resultCallback = HandleShowResult; Debug.Log (Advertisement.IsReady ("rewardedVideo")); Advertisement.Show(gameId, options); } void HandleShowResult (ShowResult result) { if(result == ShowResult.Finished) { Debug.Log("Video completed - Offer a reward to the player"); OnemoreTry (); }else if(result == ShowResult.Skipped) { Debug.LogWarning("Video was skipped - Do NOT reward the player"); }else if(result == ShowResult.Failed) { Debug.LogError("Video failed to show"); } }

Viewing all articles
Browse latest Browse all 1416

Trending Articles



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