You've already forked Commercialization.topon
update 1.1.25
This commit is contained in:
95
AnyThinkPlugin/AnyThinkAds/Common/ATLogger.cs
Normal file
95
AnyThinkPlugin/AnyThinkAds/Common/ATLogger.cs
Normal file
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
11
AnyThinkPlugin/AnyThinkAds/Common/ATLogger.cs.meta
Normal file
11
AnyThinkPlugin/AnyThinkAds/Common/ATLogger.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 4a56939c11661429c8c335f2d2bff40b
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
75
AnyThinkPlugin/AnyThinkAds/Common/IATBannerAdClient.cs
Normal file
75
AnyThinkPlugin/AnyThinkAds/Common/IATBannerAdClient.cs
Normal file
@@ -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);
|
||||
}
|
||||
}
|
||||
11
AnyThinkPlugin/AnyThinkAds/Common/IATBannerAdClient.cs.meta
Normal file
11
AnyThinkPlugin/AnyThinkAds/Common/IATBannerAdClient.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 14b00b8f6583c413eae808eee303e12e
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
14
AnyThinkPlugin/AnyThinkAds/Common/IATDownloadClient.cs
Normal file
14
AnyThinkPlugin/AnyThinkAds/Common/IATDownloadClient.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
|
||||
using AnyThinkAds.Api;
|
||||
|
||||
namespace AnyThinkAds.Common
|
||||
{
|
||||
public interface IATDownloadClient
|
||||
{
|
||||
|
||||
/**
|
||||
* @param listener
|
||||
*/
|
||||
void setListener(ATDownloadAdListener listener);
|
||||
}
|
||||
}
|
||||
11
AnyThinkPlugin/AnyThinkAds/Common/IATDownloadClient.cs.meta
Normal file
11
AnyThinkPlugin/AnyThinkAds/Common/IATDownloadClient.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 9411630d83c58412abdd159e43d90142
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
64
AnyThinkPlugin/AnyThinkAds/Common/IATInterstitialAdClient.cs
Normal file
64
AnyThinkPlugin/AnyThinkAds/Common/IATInterstitialAdClient.cs
Normal file
@@ -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: 617b2801ea6ff4304bb9e0ad2e6d0f0f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
73
AnyThinkPlugin/AnyThinkAds/Common/IATNativeAdClient.cs
Normal file
73
AnyThinkPlugin/AnyThinkAds/Common/IATNativeAdClient.cs
Normal file
@@ -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);
|
||||
|
||||
}
|
||||
}
|
||||
11
AnyThinkPlugin/AnyThinkAds/Common/IATNativeAdClient.cs.meta
Normal file
11
AnyThinkPlugin/AnyThinkAds/Common/IATNativeAdClient.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 272c430785265455c8a91a9749aea93f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
45
AnyThinkPlugin/AnyThinkAds/Common/IATNativeBannerAdClient.cs
Normal file
45
AnyThinkPlugin/AnyThinkAds/Common/IATNativeBannerAdClient.cs
Normal file
@@ -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: 123218759ab054ce0acc3258035c84ee
|
||||
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: d3d80e1d74a35402785ed9c96737d6e1
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
34
AnyThinkPlugin/AnyThinkAds/Common/IATSDKAPIClient.cs
Normal file
34
AnyThinkPlugin/AnyThinkAds/Common/IATSDKAPIClient.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
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 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);
|
||||
}
|
||||
}
|
||||
11
AnyThinkPlugin/AnyThinkAds/Common/IATSDKAPIClient.cs.meta
Normal file
11
AnyThinkPlugin/AnyThinkAds/Common/IATSDKAPIClient.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f6241adafd0a04ea3932a1031dfa3af3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
24
AnyThinkPlugin/AnyThinkAds/Common/IATSplashAdClient.cs
Normal file
24
AnyThinkPlugin/AnyThinkAds/Common/IATSplashAdClient.cs
Normal file
@@ -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);
|
||||
}
|
||||
}
|
||||
11
AnyThinkPlugin/AnyThinkAds/Common/IATSplashAdClient.cs.meta
Normal file
11
AnyThinkPlugin/AnyThinkAds/Common/IATSplashAdClient.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 987fa99d67af444b2996aec1b7561846
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user