public void OnUnityAdsDidFinish(string placementId, ShowResult showResult) { if (placementId == rewardedVideoPlacementID) { if (showResult == ShowResult.Finished) { OnAdFinished?.Invoke(this, EventArgs.Empty); } else if (showResult == ShowResult.Failed) { // TODO } } }
public void OnUnityAdsDidFinish(string placementId, ShowResult showResult) { // Define conditional logic for each ad completion status: if (showResult == ShowResult.Finished) { // Reward the user for watching the ad to completion. OnAdFinished?.Invoke(); } else if (showResult == ShowResult.Skipped) { // Do not reward the user for skipping the ad. } else if (showResult == ShowResult.Failed) { Debug.LogWarning("The ad did not finish due to an error."); } }
public static void OnAdFinishedCallback(ShowResult result) { OnAdFinished?.Invoke(null, new AdFinishedEventArgs(result)); }