- Home /
Question by
vincentbts · Jul 24, 2020 at 10:58 AM ·
advertisingreload
Relaunch\Reload RewardedAd
Hello,
When my users launch the rewardedAd, I would like they can do it again in maybe 10 minutes, but if I execute the button to show the ads a second time, I'm still locked on the ClosedEvent.
So I tried a custom code to unsubscribe all event and create new RewardedAd request in ClosedEvent, But that's not working ...
public void HandleRewardedAdClosed(object sender, EventArgs args)
{
//unsubscribe
this.rewardedAd.OnAdLoaded -= HandleRewardedAdLoaded;
this.rewardedAd.OnAdFailedToLoad -= HandleRewardedAdFailedToLoad;
this.rewardedAd.OnAdOpening -= HandleRewardedAdOpening;
this.rewardedAd.OnAdFailedToShow -= HandleRewardedAdFailedToShow;
this.rewardedAd.OnUserEarnedReward -= HandleUserEarnedReward;
this.rewardedAd.OnAdClosed -= HandleRewardedAdClosed;
this.rewardedAd = new RewardedAd(adUnitId);
//Newsubscribe
this.rewardedAd.OnAdLoaded += HandleRewardedAdLoaded;
this.rewardedAd.OnAdFailedToLoad += HandleRewardedAdFailedToLoad;
this.rewardedAd.OnAdOpening += HandleRewardedAdOpening;
this.rewardedAd.OnAdFailedToShow += HandleRewardedAdFailedToShow;
this.rewardedAd.OnUserEarnedReward += HandleUserEarnedReward;
this.rewardedAd.OnAdClosed += HandleRewardedAdClosed;
AdRequest request = new AdRequest.Builder().Build();
this.rewardedAd.LoadAd(request);
}
Do you have an idea how to launch the RewardedAd a second time ? Thanks
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613003935im_/https://answers.unity.com/themes/thub/images/avi.jpg)