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

Why does my rewarded video not play?

$
0
0
I can build everything to test on an iPhone fine, but when I click the button to play the rewarded video, it goes to my pop up telling me to connect to the internet. using UnityEngine; using System.Collections; using UnityEngine.Advertisements; public class UnityRewardAds : MonoBehaviour { public int minCoinsToRewardOnVideoWatched = 75; public int maxCoinsToRewardOnVideoWatched = 100; public static UnityRewardAds instance; public string rewardVideoID; void Awake() { instance = this; } public void ShowRewardedAd(System.Action callaBack) { if (Advertisement.IsReady(rewardVideoID)) { var options = new ShowOptions { resultCallback = callaBack }; Advertisement.Show(rewardVideoID, options); } } public int GetCoinsToRewardOnVideoWatched() { return Random.Range(minCoinsToRewardOnVideoWatched, maxCoinsToRewardOnVideoWatched); } }

Viewing all articles
Browse latest Browse all 1416

Trending Articles



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