public void CreateAndLoadAd() { TypeLoadingAds = TypeLoadingAds.Loading; _rewardedAd = new RewardedAd(_adUnitId); _rewardedAd.OnAdClosed += HandleRewardedAdClosed; _rewardedAd.OnUserEarnedReward += HandleUserEarnedReward; _rewardedAd.OnAdFailedToLoad += HandleRewardedAdFailedToLoad; _rewardedAd.OnAdLoaded += HandleRewardedAdLoaded; AdRequest request = new AdRequest.Builder().Build(); _rewardedAd.LoadAd(request); }
private void HandleRewardedAdFailedToLoad(object sender, AdErrorEventArgs e) { TypeLoadingAds = TypeLoadingAds.Error; }
private void HandleRewardedAdLoaded(object sender, EventArgs e) { TypeLoadingAds = TypeLoadingAds.Ready; }