Ejemplo n.º 1
0
 public static void CallNativeAdTrackClick(string adUnitId)
 {
     if (Application.isEditor)
     {
         return;
     }
     if (string.IsNullOrEmpty(adUnitId))
     {
         MCAdsBinding.LogMissingAdUnitID(MethodBase.GetCurrentMethod().Name);
     }
     MCAdsBinding._plugin.Call("callNativeAdTrackClick", new object[]
     {
         adUnitId
     });
 }
Ejemplo n.º 2
0
 public static void DestroyBanner(string adUnitId)
 {
     if (Application.isEditor)
     {
         return;
     }
     if (string.IsNullOrEmpty(adUnitId))
     {
         MCAdsBinding.LogMissingAdUnitID(MethodBase.GetCurrentMethod().Name);
     }
     MCAdsBinding._plugin.Call("destroyBanner", new object[]
     {
         adUnitId
     });
 }
Ejemplo n.º 3
0
 public static bool IsRewardedVideoReady(string adUnitId)
 {
     if (Application.isEditor)
     {
         return(false);
     }
     if (string.IsNullOrEmpty(adUnitId))
     {
         MCAdsBinding.LogMissingAdUnitID(MethodBase.GetCurrentMethod().Name);
     }
     return(MCAdsBinding._plugin.Call <bool>("isRewardedVideoReady", new object[]
     {
         adUnitId
     }));
 }
Ejemplo n.º 4
0
 public static string GetNativeAdClickURL(string adUnitId)
 {
     if (Application.isEditor)
     {
         return(string.Empty);
     }
     if (string.IsNullOrEmpty(adUnitId))
     {
         MCAdsBinding.LogMissingAdUnitID(MethodBase.GetCurrentMethod().Name);
     }
     return(MCAdsBinding._plugin.Call <string>("getNativeAdClickURL", new object[]
     {
         adUnitId
     }));
 }
Ejemplo n.º 5
0
 public static void ShowInterstitialAd(string adUnitId)
 {
     if (Application.isEditor)
     {
         return;
     }
     if (string.IsNullOrEmpty(adUnitId))
     {
         MCAdsBinding.LogMissingAdUnitID(MethodBase.GetCurrentMethod().Name);
     }
     MCAdsBinding._plugin.Call("showInterstitial", new object[]
     {
         adUnitId
     });
 }
Ejemplo n.º 6
0
 public static void SetAutoRefreshBannerEnabled(string adUnitId, bool enabled)
 {
     if (Application.isEditor)
     {
         return;
     }
     if (string.IsNullOrEmpty(adUnitId))
     {
         MCAdsBinding.LogMissingAdUnitID(MethodBase.GetCurrentMethod().Name);
     }
     MCAdsBinding._plugin.Call("setAutorefreshEnabled", new object[]
     {
         adUnitId,
         enabled
     });
 }
Ejemplo n.º 7
0
 public static void ShowBanner(string adUnitId, bool shouldShow = true)
 {
     if (Application.isEditor)
     {
         return;
     }
     if (string.IsNullOrEmpty(adUnitId))
     {
         MCAdsBinding.LogMissingAdUnitID(MethodBase.GetCurrentMethod().Name);
     }
     MCAdsBinding._plugin.Call("hideBanner", new object[]
     {
         adUnitId,
         !shouldShow
     });
 }
Ejemplo n.º 8
0
 public static void RequestRewardedVideo(string adUnitId, string keywords)
 {
     if (Application.isEditor)
     {
         return;
     }
     if (string.IsNullOrEmpty(adUnitId))
     {
         MCAdsBinding.LogMissingAdUnitID(MethodBase.GetCurrentMethod().Name);
     }
     MCAdsBinding._plugin.Call("requestRewardedVideo", new object[]
     {
         adUnitId,
         keywords
     });
 }
Ejemplo n.º 9
0
 public static void CreateBanner(string adUnitId, MCAdsAdPlacement position = MCAdsAdPlacement.Custom, MCAdsBannerType size = MCAdsBannerType.Size320x50, string keywords = "", int marginTop = 0, int marginLeft = 0, int customBannerWidth = 0, int customBannerHeight = 0)
 {
     if (Application.isEditor)
     {
         return;
     }
     if (string.IsNullOrEmpty(adUnitId))
     {
         MCAdsBinding.LogMissingAdUnitID(MethodBase.GetCurrentMethod().Name);
     }
     MCAdsBinding._plugin.Call("showBanner", new object[]
     {
         (int)size,
         (int)position,
         adUnitId,
         keywords,
         marginTop,
         marginLeft,
         customBannerWidth,
         customBannerHeight
     });
 }
Ejemplo n.º 10
0
 public static void InitializeInterstitialAdSystem(string[] adUnits)
 {
     if (Application.isEditor)
     {
         return;
     }
     if (adUnits == null || adUnits.Length == 0)
     {
         MCAdsBinding.LogMissingAdUnitID(MethodBase.GetCurrentMethod().Name);
     }
     if (adUnits.Length > 0)
     {
         string text = adUnits[0];
         for (int i = 1; i < adUnits.Length; i++)
         {
             text = text + "," + adUnits[i];
         }
         MCAdsBinding._plugin.Call("initializeInterstitialAdSystem", new object[]
         {
             text
         });
     }
 }