internal override void RequestInterstitialAd(string keywords = "", string userDataKeywords = "") { RequestAdUnit(); MoPubUnityEditor.WaitOneFrame(() => { MoPubManager.Instance.EmitInterstitialLoadedEvent(MoPubUnityEditor.ArgsToJson(AdUnitId)); }); }
internal override void RequestRewardedVideo(List <MoPub.LocalMediationSetting> mediationSettings = null, string keywords = null, string userDataKeywords = null, double latitude = MoPub.LatLongSentinel, double longitude = MoPub.LatLongSentinel, string customerId = null) { RequestAdUnit(); MoPubUnityEditor.WaitOneFrame(() => { MoPubManager.Instance.EmitRewardedVideoLoadedEvent(MoPubUnityEditor.ArgsToJson(AdUnitId)); }); }
internal override void ForceRefresh() { if (!CheckAdUnitRequested()) { return; } MoPubUnityEditor.WaitOneFrame(() => { MoPubManager.Instance.EmitAdLoadedEvent(MoPubUnityEditor.ArgsToJson(AdUnitId, "320", "50")); }); }
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(); }); }); } }
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(); }); }); } }
internal override void RequestNativeAd() { MoPubLog.Log("RequestNativeAd", MoPubLog.AdLogEvent.LoadAttempted); RequestAdUnit(); MoPubUnityEditor.WaitOneFrame(() => { if (!"1".Equals(AdUnitId)) { Debug.Log("Native ad unit was requested: " + AdUnitId); return; } MoPubManager.Instance.EmitNativeLoadEvent(AdUnitId, new AbstractNativeAd.Data { MainImageUrl = new Uri("https://d30x8mtr3hjnzo.cloudfront.net/creatives/8d0a2ba02b2b485f97e1867366762951"), IconImageUrl = new Uri("https://d30x8mtr3hjnzo.cloudfront.net/creatives/6591163c525f4720b99abf831ca247f6"), ClickDestinationUrl = new Uri("https://www.mopub.com/click-test"), CallToAction = "Go", Title = "MoPub", Text = "Success! Your integration is ready to go. Tap to test this ad.", PrivacyInformationIconClickThroughUrl = new Uri("https://www.mopub.com/optout/") }); }); }
internal override void ForceRefresh() { MoPubUnityEditor.WaitOneFrame(() => { MoPubManager.Instance.EmitAdLoadedEvent(MoPubUnityEditor.ArgsToJson(AdUnitId, "320", "50")); }); }