Example #1
0
 /// <summary>
 /// 加载广告
 /// </summary>
 public static void LoadAD(string SDKName, ADType adType, string tag = "")
 {
     if (s_useNewSDKManager)
     {
         SDKManagerNew.LoadAD(SDKName, adType, tag);
     }
     else
     {
         try
         {
             GetADService(SDKName).LoadAD(adType, tag);
         }
         catch (Exception e)
         {
             Debug.LogError("SDKManager LoadAD Exception: " + e.ToString());
         }
     }
 }
 /// <summary>
 /// 加载广告,默认访问第一个接口
 /// </summary>
 public static void LoadAD(ADType adType, string tag = "")
 {
     if (s_ADServiceList.Count > 0)
     {
         GetADService(0).LoadAD(adType, tag);
     }
     else
     {
         if (s_useNewSDKManager)
         {
             SDKManagerNew.LoadAD(adType, tag);
         }
         else
         {
             Debug.LogError("SDKManager LoadAD s_ADServiceList count is 0");
         }
     }
 }
Example #3
0
        /// <summary>
        /// 加载广告
        /// </summary>
        public static void LoadAD(string SDKName, ADType adType, string tag = "")
        {
            if (GetHasSDKService(s_ADServiceList, SDKName))
            {
                try
                {
                    GetADService(SDKName).LoadAD(adType, tag);
                }
                catch (Exception e)
                {
                    Debug.LogError("SDKManager Pay Exception: " + e.ToString());
                }
            }

            else if (s_useNewSDKManager)
            {
                SDKManagerNew.LoadAD(SDKName, adType, tag);
            }
            else
            {
                Debug.LogError("广告SDK 没有配置! ");
            }
        }