fix:1、删除上一个sdk,更换新的。2、删除了max广告
This commit is contained in:
@@ -0,0 +1,95 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AnyThinkAds.Common
|
||||
{
|
||||
public class ATLogger
|
||||
{
|
||||
private static bool isDebug = false;
|
||||
public static bool IsDebug
|
||||
{
|
||||
get {
|
||||
return isDebug;
|
||||
}
|
||||
set {
|
||||
isDebug = value;
|
||||
}
|
||||
}
|
||||
|
||||
// public static void Log(string msg)
|
||||
// {
|
||||
// Log(msg, null);
|
||||
// }
|
||||
|
||||
// public static void Log(string format, object obj)
|
||||
// {
|
||||
// Log(format, obj, null);
|
||||
// }
|
||||
|
||||
public static void Log(string format, object obj1 = null, object obj2 = null)
|
||||
{
|
||||
if (!isDebug) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (obj1 == null && obj2 == null)
|
||||
{
|
||||
Debug.Log(format);
|
||||
}
|
||||
else if (obj1 != null && obj2 == null)
|
||||
{
|
||||
Debug.Log(String.Format(format, obj1));
|
||||
}
|
||||
else if (obj1 == null && obj2 != null)
|
||||
{
|
||||
Debug.Log(String.Format(format, obj2));
|
||||
}
|
||||
else {
|
||||
Debug.Log(String.Format(format, obj1, obj2));
|
||||
}
|
||||
} catch(Exception e)
|
||||
{
|
||||
Debug.LogError("Log error: " + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// public static void LogError(string msg)
|
||||
// {
|
||||
// LogError(msg, null);
|
||||
// }
|
||||
|
||||
// public static void LogError(string format, object obj)
|
||||
// {
|
||||
// LogError(format, obj, null);
|
||||
// }
|
||||
|
||||
public static void LogError(string format, object obj1 = null, object obj2 = null)
|
||||
{
|
||||
if (!isDebug) {
|
||||
return;
|
||||
}
|
||||
try {
|
||||
if (obj1 == null && obj2 == null)
|
||||
{
|
||||
Debug.LogError(format);
|
||||
}
|
||||
else if (obj1 != null && obj2 == null)
|
||||
{
|
||||
Debug.LogError(String.Format(format, obj1));
|
||||
}
|
||||
else if (obj1 == null && obj2 != null)
|
||||
{
|
||||
Debug.LogError(String.Format(format, obj2));
|
||||
}
|
||||
else {
|
||||
Debug.LogError(String.Format(format, obj1, obj2));
|
||||
}
|
||||
} catch(Exception e)
|
||||
{
|
||||
Debug.LogError("Log error: " + e.Message);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 45d2ba570cbd740db8eaf1d145007f77
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,75 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using AnyThinkAds.Api;
|
||||
|
||||
namespace AnyThinkAds.Common
|
||||
{
|
||||
public interface IATBannerAdClient : IATBannerEvents
|
||||
{
|
||||
/***
|
||||
* 请求广告
|
||||
* @param placementId 广告位id
|
||||
* @parm mapJson 各平台的私有属性 一般可以不调用
|
||||
*/
|
||||
void loadBannerAd(string placementId, string mapJson);
|
||||
/**
|
||||
* 获取广告状态信息(是否正在加载、是否存在可以展示广告、广告缓存详细信息)
|
||||
* @param unityid
|
||||
*
|
||||
*/
|
||||
string checkAdStatus(string placementId);
|
||||
/***
|
||||
*
|
||||
* 设置监听回调接口
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
void setListener(ATBannerAdListener listener);
|
||||
/***
|
||||
*
|
||||
* 展示广告,
|
||||
* @param placementId
|
||||
* @param pass bottom or top for position
|
||||
* @parm mapJson
|
||||
*/
|
||||
void showBannerAd(string placementId, string position, string mapJson);
|
||||
/***
|
||||
*
|
||||
* 展示广告,
|
||||
* @param placementId
|
||||
* @param rect the region used to show banner ad; currently only x&y fields in rect are used(as the origin, or top left corner of the banner).
|
||||
* @parm mapJson
|
||||
*/
|
||||
void showBannerAd(string placementId, ATRect rect, string mapJson);
|
||||
/***
|
||||
*
|
||||
* 清理广告
|
||||
* @param placementId
|
||||
* @param anyThinkNativeAdView 这里的属性是显示区域坐标等配置,需要自行设置
|
||||
*/
|
||||
void cleanBannerAd(string placementId);
|
||||
/***
|
||||
*
|
||||
* 隐藏广告
|
||||
* @param placementId
|
||||
* @param rect the region used to show banner ad.
|
||||
*/
|
||||
void hideBannerAd(string placementId);
|
||||
/***
|
||||
*
|
||||
* (重新)展示之前隐藏的广告
|
||||
* @param placementId
|
||||
*/
|
||||
void showBannerAd(string placementId);
|
||||
/***
|
||||
* 清理缓存
|
||||
*/
|
||||
void cleanCache(string placementId);
|
||||
|
||||
/***
|
||||
* 获取所有可用缓存广告
|
||||
*/
|
||||
string getValidAdCaches(string placementId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d36adfb982bfc463f9ffb4b30ceede5c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,14 @@
|
||||
|
||||
using AnyThinkAds.Api;
|
||||
|
||||
namespace AnyThinkAds.Common
|
||||
{
|
||||
public interface IATDownloadClient
|
||||
{
|
||||
|
||||
/**
|
||||
* @param listener
|
||||
*/
|
||||
void setListener(ATDownloadAdListener listener);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0615492f4518b488590a3688f063873e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,64 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using AnyThinkAds.Api;
|
||||
|
||||
namespace AnyThinkAds.Common
|
||||
{
|
||||
public interface IATInterstitialAdClient : IATInterstitialAdEvents
|
||||
{
|
||||
/***
|
||||
* 请求广告
|
||||
* @param placementId 广告位id
|
||||
* @parm mapJson 各平台的私有属性 一般可以不调用
|
||||
*/
|
||||
void loadInterstitialAd(string placementId, string mapJson);
|
||||
/***
|
||||
*
|
||||
* 设置监听回调接口
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
void setListener(ATInterstitialAdListener listener);
|
||||
/**
|
||||
* 是否存在可以展示的广告
|
||||
* @param unityid
|
||||
*/
|
||||
bool hasInterstitialAdReady(string placementId);
|
||||
/**
|
||||
* 获取广告状态信息(是否正在加载、是否存在可以展示广告、广告缓存详细信息)
|
||||
* @param unityid
|
||||
*
|
||||
*/
|
||||
string checkAdStatus(string placementId);
|
||||
/***
|
||||
* 显示广告
|
||||
*/
|
||||
void showInterstitialAd(string placementId, string mapJson);
|
||||
|
||||
|
||||
/***
|
||||
* 获取所有可用缓存广告
|
||||
*/
|
||||
string getValidAdCaches(string placementId);
|
||||
|
||||
void entryScenarioWithPlacementID(string placementId, string scenarioID);
|
||||
|
||||
|
||||
string checkAutoAdStatus(string placementId);
|
||||
|
||||
void addAutoLoadAdPlacementID(string[] placementIDList);
|
||||
|
||||
void removeAutoLoadAdPlacementID(string placementId);
|
||||
|
||||
bool autoLoadInterstitialAdReadyForPlacementID(string placementId);
|
||||
|
||||
string getAutoValidAdCaches(string placementId);
|
||||
|
||||
void setAutoLocalExtra(string placementId, string mapJson);
|
||||
|
||||
void entryAutoAdScenarioWithPlacementID(string placementId, string scenarioID);
|
||||
|
||||
void showAutoAd(string placementId, string mapJson);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 29aeb78d58bc140fa97ee8acc8403bd1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,73 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using AnyThinkAds.Api;
|
||||
|
||||
namespace AnyThinkAds.Common
|
||||
{
|
||||
public interface IATNativeAdClient : IATNativeAdEvents
|
||||
{
|
||||
/***
|
||||
* 请求广告
|
||||
* @param placementId 广告位id
|
||||
* @parm mapJson 各平台的私有属性 一般可以不调用
|
||||
*/
|
||||
void loadNativeAd(string placementId, string mapJson);
|
||||
/***
|
||||
* 判断是否有广告存在
|
||||
* 可以在显示广告之前调用
|
||||
* @param placementId 广告位id
|
||||
*/
|
||||
bool hasAdReady(string placementId);
|
||||
/**
|
||||
* 获取广告状态信息(是否正在加载、是否存在可以展示广告、广告缓存详细信息)
|
||||
* @param unityid
|
||||
*
|
||||
*/
|
||||
string checkAdStatus(string placementId);
|
||||
/***
|
||||
*
|
||||
* 设置监听回调接口
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
void setListener(ATNativeAdListener listener);
|
||||
/***
|
||||
*
|
||||
* 展示广告,
|
||||
* @param placementId
|
||||
* @param anyThinkNativeAdView 这里的属性是显示区域坐标等配置,需要自行设置
|
||||
* @parm mapJson
|
||||
*/
|
||||
void renderAdToScene(string placementId, ATNativeAdView anyThinkNativeAdView, string mapJson);
|
||||
|
||||
/***
|
||||
*
|
||||
* 清理广告
|
||||
* @param placementId
|
||||
* @param anyThinkNativeAdView 这里的属性是显示区域坐标等配置,需要自行设置
|
||||
*/
|
||||
void cleanAdView(string placementId, ATNativeAdView anyThinkNativeAdView);
|
||||
/***
|
||||
* 页面显示
|
||||
*/
|
||||
void onApplicationForces(string placementId, ATNativeAdView anyThinkNativeAdView);
|
||||
/***
|
||||
* 页面隐藏
|
||||
*/
|
||||
void onApplicationPasue(string placementId, ATNativeAdView anyThinkNativeAdView);
|
||||
/***
|
||||
* 清理缓存
|
||||
*/
|
||||
void cleanCache(string placementId);
|
||||
|
||||
/***
|
||||
* 获取所有可用缓存广告
|
||||
*/
|
||||
string getValidAdCaches(string placementId);
|
||||
|
||||
void entryScenarioWithPlacementID(string placementId, string scenarioID);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 8e60de0648af644da95a888d0ddb83f6
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,45 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using AnyThinkAds.Api;
|
||||
|
||||
namespace AnyThinkAds.Common
|
||||
{
|
||||
public interface IATNativeBannerAdClient : IATNativeAdEvents
|
||||
{
|
||||
/***
|
||||
* 请求广告
|
||||
* @param placementId 广告位id
|
||||
* @parm mapJson 各平台的私有属性 一般可以不调用
|
||||
*/
|
||||
void loadAd(string placementId, string mapJson);
|
||||
|
||||
/***
|
||||
* 判断是否有广告存在
|
||||
* 可以在显示广告之前调用
|
||||
* @param placementId 广告位id
|
||||
*/
|
||||
bool adReady(string placementId);
|
||||
/***
|
||||
*
|
||||
* 设置监听回调接口
|
||||
*
|
||||
* @param listener
|
||||
*/
|
||||
void setListener(ATNativeBannerAdListener listener);
|
||||
/***
|
||||
*
|
||||
* 展示广告,
|
||||
* @param placementId
|
||||
* @param rect
|
||||
*/
|
||||
void showAd(string placementId, ATRect rect, Dictionary<string, string> pairs);
|
||||
/***
|
||||
*
|
||||
* 移除广告
|
||||
* @param placementId
|
||||
*/
|
||||
void removeAd(string placementId);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d20c708125d9743b2af7163dfd4b54b7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,63 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
using AnyThinkAds.Api;
|
||||
|
||||
namespace AnyThinkAds.Common
|
||||
{
|
||||
public interface IATRewardedVideoAdClient : IATRewardedVideoEvents
|
||||
{
|
||||
/**
|
||||
* 请求视屏广告
|
||||
* @param placementId 广告位id
|
||||
* @parm mapJson 平台私有参数 一般不些
|
||||
*/
|
||||
void loadVideoAd(string placementId, string mapJson);
|
||||
/**
|
||||
* @param listener 监听回调
|
||||
*/
|
||||
void setListener(ATRewardedVideoListener listener);
|
||||
/**
|
||||
* 是否存在可以展示的广告
|
||||
* @param unityid
|
||||
*
|
||||
*/
|
||||
bool hasAdReady(string placementId);
|
||||
/**
|
||||
* 获取广告状态信息(是否正在加载、是否存在可以展示广告、广告缓存详细信息)
|
||||
* @param unityid
|
||||
*
|
||||
*/
|
||||
string checkAdStatus(string placementId);
|
||||
/***
|
||||
* 显示广告
|
||||
*/
|
||||
void showAd(string placementId, string mapJson);
|
||||
|
||||
/***
|
||||
* 获取所有可用缓存广告
|
||||
*/
|
||||
string getValidAdCaches(string placementId);
|
||||
|
||||
void entryScenarioWithPlacementID(string placementId, string scenarioID);
|
||||
|
||||
|
||||
string checkAutoAdStatus(string placementId);
|
||||
|
||||
void addAutoLoadAdPlacementID(string[] placementIDList);
|
||||
|
||||
void removeAutoLoadAdPlacementID(string placementId);
|
||||
|
||||
bool autoLoadRewardedVideoReadyForPlacementID(string placementId);
|
||||
|
||||
string getAutoValidAdCaches(string placementId);
|
||||
|
||||
void setAutoLocalExtra(string placementId, string mapJson);
|
||||
|
||||
void entryAutoAdScenarioWithPlacementID(string placementId, string scenarioID);
|
||||
|
||||
void showAutoAd(string placementId, string mapJson);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9dc52b7fdd47842a3aaae5c4b8fa95de
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,35 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using AnyThinkAds.Api;
|
||||
|
||||
namespace AnyThinkAds.Common
|
||||
{
|
||||
public interface IATSDKAPIClient
|
||||
{
|
||||
void initSDK(string appId, string appKey);
|
||||
void initSDK(string appId, string appKey, ATSDKInitListener listener);
|
||||
void showDebuggerUI();
|
||||
void showDebuggerUI(string debugKey);
|
||||
void getUserLocation(ATGetUserLocationListener listener);
|
||||
void setGDPRLevel(int level);
|
||||
void showGDPRAuth();
|
||||
void showGDPRConsentDialog(ATConsentDismissListener listener);
|
||||
void addNetworkGDPRInfo(int networkType, string mapJson);
|
||||
void setChannel(string channel);
|
||||
void setSubChannel(string subchannel);
|
||||
void initCustomMap(string cutomMap);
|
||||
void setCustomDataForPlacementID(string customData, string placementID);
|
||||
void setLogDebug(bool isDebug);
|
||||
int getGDPRLevel();
|
||||
bool isEUTraffic();
|
||||
void deniedUploadDeviceInfo(string deniedInfo);
|
||||
|
||||
void setExcludeBundleIdArray(string bundleIds);
|
||||
void setExcludeAdSourceIdArrayForPlacementID(string placementID, string adsourceIds);
|
||||
void setSDKArea(int area);
|
||||
void getArea(ATGetAreaListener listener);
|
||||
void setWXStatus(bool install);
|
||||
void setLocation(double longitude, double latitude);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: fccdac04e450f4b6f8bf324cca2ad647
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -0,0 +1,24 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using AnyThinkAds.Api;
|
||||
|
||||
namespace AnyThinkAds.Common
|
||||
{
|
||||
public interface IATSplashAdClient : IATSplashEvents
|
||||
{
|
||||
// void loadSplashAd(string placementId, string mapJson);
|
||||
void loadSplashAd(string placementId, int fetchAdTimeout, string defaultAdSourceConfig, string mapJson);
|
||||
void setListener(ATSplashAdListener listener);
|
||||
|
||||
bool hasSplashAdReady(string placementId);
|
||||
|
||||
string checkAdStatus(string placementId);
|
||||
|
||||
void showSplashAd(string placementId, string mapJson);
|
||||
|
||||
string getValidAdCaches(string placementId);
|
||||
|
||||
void entryScenarioWithPlacementID(string placementId, string scenarioID);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f2826cdfe64c14dcca1ffaf4e5a5cb7a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user