示例#1
0
        /// <summary>
        /// Returns the cross-platform ID associated with placement in the given dictionary.
        /// Returns <c>string.Empty</c> if no such ID found.
        /// </summary>
        /// <returns>The identifier for placement.</returns>
        /// <param name="dict">Dict.</param>
        /// <param name="placement">Placement.</param>
        protected virtual string FindIdForPlacement(Dictionary <AdPlacement, AdId> dict, AdPlacement placement)
        {
            AdId idObj = null;

            if (placement != null && dict != null)
            {
                dict.TryGetValue(placement, out idObj);
            }

            if (idObj != null && !string.IsNullOrEmpty(idObj.Id))
            {
                return(idObj.Id);
            }
            else
            {
                return(string.Empty);
            }
        }
示例#2
0
        private string GetCustomRewardedAdId(AdPlacement placement)
        {
            AdId idObj = null;

            if (placement != null && mAdSettings != null && mAdSettings.CustomRewardedAdIds != null)
            {
                mAdSettings.CustomRewardedAdIds.TryGetValue(placement, out idObj);
            }

            if (idObj != null && !string.IsNullOrEmpty(idObj.Id))
            {
                return(idObj.Id);
            }
            else
            {
                Debug.Log("Could not find AdColony rewarded ad ID for placement " + placement.Name);
                return(string.Empty);
            }
        }
示例#3
0
 public UnityAdsSettings()
 {
     mDefaultInterstitialAdId = new AdId(DEFAULT_VIDEO_ZONE_ID, DEFAULT_VIDEO_ZONE_ID);
     mDefaultRewardedAdId     = new AdId(DEFAULT_REWARDED_ZONE_ID, DEFAULT_REWARDED_ZONE_ID);
 }
示例#4
0
 public VungleBannerAd(AdId id, AdPlacement placement) : base(id, placement)
 {
 }
示例#5
0
 public VungleAd(AdId id, AdPlacement placement)
 {
     this.Id        = id;
     this.Placement = placement;
 }
示例#6
0
            public VungleRewardedAd(AdId id, AdPlacement placement, Dictionary <string, object> options) : base(id, placement)
            {
#if EM_VUNGLE
                this.options = options;
#endif
            }
示例#7
0
 public UnityAdsSettings()
 {
     mDefaultBannerAdId       = new AdId(DEFAULT_BANNER_ID_IOS, DEFAULT_BANNER_ID_ANDROID);
     mDefaultInterstitialAdId = new AdId(DEFAULT_INTERSTITIAL_ID_IOS, DEFAULT_INTERSTITIAL_ID_ANDROID);
     mDefaultRewardedAdId     = new AdId(DEFAULT_REWARDED_ID_IOS, DEFAULT_REWARDED_ID_ANDROID);
 }