Опять же использую Easy Mobile Pro и у них в документации пишет следущее:
Working with Rewarded Ads
The method to show a rewarded ad requires it to be already loaded. Therefore you should check for the ad's availability before showing it.
// Check if rewarded ad is ready
bool isReady = Advertising.IsRewardedAdReady();
// Show it if it's ready
if (isReady)
{
Advertising.ShowRewardedAd();
}
С этим понятно, когда реклама готова - показываем.
A RewardedAdCompleted event will be fired whenever a rewarded ad has completed. You should listen to this event to reward the user for watching the ad. Otherwise, a RewardedAdSkipped event will be fired if the ad is skipped before finishing (and the user therefore is not entitled to the reward).
// Subscribe to rewarded ad events
void OnEnable()
{
Advertising.RewardedAdCompleted += RewardedAdCompletedHandler;
Advertising.RewardedAdSkipped += RewardedAdSkippedHandler;
}
// Unsubscribe events
void OnDisable()
{
Advertising.RewardedAdCompleted -= RewardedAdCompletedHandler;
Advertising.RewardedAdSkipped -= RewardedAdSkippedHandler;
}
// Event handler called when a rewarded ad has completed
void RewardedAdCompletedHandler(RewardedAdNetwork network, AdLocation location)
{
Debug.Log("Rewarded ad has completed. The user should be rewarded now.");
}
// Event handler called when a rewarded ad has been skipped
void RewardedAdSkippedHandler(RewardedAdNetwork network, AdLocation location)
{
Debug.Log("Rewarded ad was skipped. The user should NOT be rewarded.");
}
А это куда добавлять и как оно должно работать?