- Home /
Question by
LucasPThiago · Sep 18, 2018 at 04:24 PM ·
c#script.videoadmob
Admob Rewarded Video are not showing
I'm using this code to create and load a Rewarded Video, when i click on the button, with, teorically it has to show, it doesn't. But, in my Debug shows that are instanced, loaded and, how i said, when i click on the button, the Debug says that is showing too. However, I've tested in my smartphone and an emulator and nothing appears.
public class AdRewardedVideo : MonoBehaviour {
string VideoAdID = "THE ID HERE";
RewardBasedVideoAd MyRewardedVideoAd;
void Start() {
MyRewardedVideoAd = RewardBasedVideoAd.Instance;
}
public void LoadVideoAd() {
if (!MyRewardedVideoAd.IsLoaded()) {
AdRequest request = new AdRequest.Builder().Build();
MyRewardedVideoAd.LoadAd(request,VideoAdID);
}
}
public void showVideoAd() {
if (MyRewardedVideoAd.IsLoaded()) {
MyRewardedVideoAd.Show();
} else {
LoadVideoAd();
}
}
}
Comment
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Capture Screen Script 0 Answers
How can I color array of gameobjects over time ? 2 Answers
Find index of item in list 1 Answer