i implemented admob ads and everything works fine banner and video ads show just fine , the problem is
the reward that the player has to take isn't connected to the ad itself , but the button the player press to watch the ad , i tried showing a panel to notify player that he won a reward after watching the ad but nothing shows , the player just receives the reward and the ad has nothing to do with it , i followed tutorials on youtube exactly , their code worked fine but mine doesn(t work evern though i did exactly the same .........so i chacked my code in visual studio and there was these errors :
-code sample :
void Start()
{
MobileAds.Initialize(APP_ID);
this.RewardvideoAD = RewardBasedVideoAd.Instance;
this.RequestBanner();
this.RequestRewardBasedVideoAd();
ShowBannerAd();
Debug.Log("banner ad on display ");
//----------------------------------------------------------Video AD Subscription
// Called when an ad request has successfully loaded.
this.RewardvideoAD.OnAdLoaded += HandleRewardedAdLoaded;
// Called when an ad request failed to load.
this.RewardvideoAD.OnAdFailedToLoad +=
HandleRewardedAdFailedToLoad;
// Called when an ad is shown.
this.RewardvideoAD.OnAdOpening += HandleRewardedAdOpening;
// Called when an ad request failed to show.
this.RewardvideoAD.OnAdFailedToShow += HandleRewardedAdFailedToShow;
// Called when the user should be rewarded for interacting with the ad.
this.RewardvideoAD.OnUserEarnedReward += HandleUserEarnedReward;
// Called when the ad is closed.
this.RewardvideoAD.OnAdClosed += HandleRewardedAdClosed;
}
errors :
![alt text][1]
onfailedtoload has redline all over , and two red lines under OnFailedToShow and OnUserEarnedReward , so generated a field for them on visual studio but still the same , any ideas ?thank you
[1]: /storage/temp/174322-nh.png
↧