Example #1
0
 /// <summary>
 /// Reconfigure an existing ad
 /// </summary>
 /// <param name="adType">The ad type</param>
 /// <param name="width">Width of the ad</param>
 /// <param name="height">Height of the ad</param>
 /// <param name="verticalPlacement">Where should the ad be placed vertically</param>
 /// <param name="horizontalPlacement">Where should the ad be placed horizontally</param>
 public static void ReconfigureAd(WSABannerAdType adType, int width, int height, WSAAdVerticalPlacement verticalPlacement, WSAAdHorizontalPlacement horizontalPlacement)
 {
     if (!_unityEditor)
     {
         UnityEngine.WSA.Application.InvokeOnUIThread(() =>
         {
             _BannerAdReconfigure(adType.ToString(), width, height, verticalPlacement.ToString(), horizontalPlacement.ToString());
         }, false);
     }
 }
Example #2
0
 /// <summary>
 /// Create a banner ad
 /// </summary>
 /// <param name="adType">The ad type</param>
 /// <param name="width">Width of the ad</param>
 /// <param name="height">Height of the ad</param>
 /// <param name="verticalPlacement">Where should the ad be placed vertically</param>
 /// <param name="horizontalPlacement">Where should the ad be placed horizontally</param>
 public static void CreatAd(WSABannerAdType adType, int width, int height, WSAAdVerticalPlacement verticalPlacement, WSAAdHorizontalPlacement horizontalPlacement)
 {
     if (!_unityEditor)
     {
         UnityEngine.WSA.Application.InvokeOnUIThread(() =>
         {
             if (adType == WSABannerAdType.AdDuplex)
             {
                 _BannerAdCreate(adType.ToString(), _adDuplexAppId, _adDuplexAdUnitId, width, height, verticalPlacement.ToString(), horizontalPlacement.ToString());
             }
             else if (adType == WSABannerAdType.Microsoft)
             {
                 _BannerAdCreate(adType.ToString(), _msAppId, _msAdUnitId, width, height, verticalPlacement.ToString(), horizontalPlacement.ToString());
             }
         }, false);
     }
 }