'Admob Rewarded Video third party
I have been trying my best to get the Admob Rewarded Video to work/show in my app, but I just can't get it to work. I have all the plugins installed correctly I believe.
This is my current code.
using UnityEngine;
using System.Collections;
using GoogleMobileAds.Api;
public class AdManager2 : MonoBehaviour
{
string adUnitId = "MY_UNIT_ID";
RewardBasedVideoAd rewardBasedVideo = null;
void Start()
{
rewardBasedVideo = RewardBasedVideoAd.Instance;
}
public void adButton()
{
AdRequest request = new AdRequest.Builder().Build();
rewardBasedVideo.LoadAd(request, adUnitId);
showAd();
}
public void showAd()
{
if (rewardBasedVideo.IsLoaded())
{
rewardBasedVideo.Show();
}
}
}
This doesn't work for me, I click the button but nothing works. I have also tried multiple scripts from different people too, but not a single one of them work for me...
I would really appreciate it if someone could help me with this, Thanks in advance,
-Lente
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
