Hello,
I have trouble implementing unity ads’ rewarded video on android. ShowResult in resultCallback of Advertisement.Show always equals ShowResult.Failed. Interstitial ads work fine there’s only problem with rewarded video. Advertisement.IsReady(“rewardedVideo”) returns true, so video ad should be ready to show. I tried to enable and disable test mode, nothing changes.
Random facts:
-When I change “rewardedVideo” to something else Advertisement.IsReady returns false, so ID should be corrent
-Video ad with ID “rewardedVideo” can be shown when I change default ad in the dashboard from “Video” to “rewardedVideo”
using UnityEngine;
using UnityEngine.Advertisements;
public class UnityAdManager : MonoBehaviour
{
const string videoAdZone = "rewardedVideo";
public static bool IsInterstitialLoaded()
{
return Advertisement.isInitialized && Advertisement.IsReady();
}
public static void ShowInterstitial()
{
if (IsInterstitialLoaded())
{
Advertisement.Show();
}
}
public static bool IsVideoAdLoaded()
{
return Advertisement.isInitialized && Advertisement.IsReady(videoAdZone);
}
public static void ShowVideoAd()
{
if (IsVideoAdLoaded())
{
ShowOptions options = new ShowOptions { resultCallback = HandleShowResult };
Advertisement.Show("rewardedVideoZone", options);
}
}
static void HandleShowResult(ShowResult result)
{
if (result == ShowResult.Finished)
{
AdManager.Instance.OnVideoAdWatched();
}
}
}
Unity ads settings:
Unity version: 5.3.5 and 5.4
Platform: android