Hello,
I am using Unity Ads and I managed to show ads in game, but when it came to result, I am getting none.
The script I am using (its only the Ad function)
public void ThrowAd ()
{
if (Advertisement.isSupported) {
ShowOptions options = new ShowOptions();
ShowResult result = new ShowResult();
Advertisement.Initialize ("My Unpublished Game ID", false);
if (Advertisement.isReady (zoneId: "rewardedVideoZone")) {
options.pause = true;
AdsD = AdsDelay;
Advertisement.Show("rewardedVideoZone");
} else {
AdDetails.text = "Ad not loaded";
}
options.resultCallback = results => {
switch (result) {
case(ShowResult.Failed):
AdDetails.text = "Ad failed!";
break;
case(ShowResult.Finished):
if (AdType == 1) {
AdDetails.text = "You just earned a gem!";
} else {
AdDetails.text = "Thanks for watching the Ad";
}
break;
case(ShowResult.Skipped):
AdDetails.text = "Ad was skipped :(";
break;
}
};
}
}
It shows the ad perfectly but do not give any reward/message to me. (Unity Remote not working so cant debug log (Already tried text fields)).
Also it gives me a error while viewing the picture ad (yes videos are not coming) that says ‘Video Playback Error’. Please Help!