示例#1
0
 internal override void ShowInterstitialAd()
 {
     if (CheckAdUnitRequested())
     {
         MoPubUnityEditor.WaitOneFrame(() => {
             var json = MoPubUnityEditor.ArgsToJson(AdUnitId);
             MoPubManager.Instance.EmitInterstitialShownEvent(json);
             MoPubUnityEditor.WaitOneFrame(() => {
                 MoPubManager.Instance.EmitInterstitialDismissedEvent(json);
                 MoPubUnityEditor.SimulateApplicationResume();
             });
         });
     }
 }
示例#2
0
 internal override void ShowRewardedVideo(string customData)
 {
     if (CheckAdUnitRequested())
     {
         MoPubUnityEditor.WaitOneFrame(() => {
             var json = MoPubUnityEditor.ArgsToJson(AdUnitId);
             MoPubManager.Instance.EmitRewardedVideoShownEvent(json);
             MoPubUnityEditor.WaitOneFrame(() => {
                 MoPubManager.Instance.EmitRewardedVideoClosedEvent(json);
                 MoPubUnityEditor.SimulateApplicationResume();
             });
         });
     }
 }