update 2.1.3

This commit is contained in:
2024-09-09 15:59:47 +08:00
parent 9a6c006139
commit 0f2acf4508
17 changed files with 158 additions and 96 deletions

View File

@@ -46,10 +46,14 @@ namespace AnyThinkAds.Api{
this.y = y;
this.width = width;
this.height = height;
this.usesPixel = false;
this.backgroundColor = backgroundColor;
this.textColor = textColor;
this.textSize = textSize;
#if UNITY_ANDROID
this.usesPixel = true;
#else
this.usesPixel = false;
#endif
}
}
}

View File

@@ -21,15 +21,18 @@ namespace AnyThinkAds.Api
this.y = y;
this.width = width;
this.height = height;
this.usesPixel = false;
}
public int x = 0;
public int y = 0;
public int width = 0;
public int height = 0;
public bool usesPixel = false;
// public bool usesPixel = false;
#if UNITY_ANDROID
public bool usesPixel = true;
#else
public bool usesPixel = false;
#endif
}
public class ATSize
@@ -45,11 +48,15 @@ namespace AnyThinkAds.Api
{
this.width = width;
this.height = height;
this.usesPixel = false;
}
public int width = 0;
public int height = 0;
public bool usesPixel = false;
#if UNITY_ANDROID
public bool usesPixel = true;
#else
public bool usesPixel = false;
#endif
}
}

View File

@@ -93,6 +93,11 @@ namespace AnyThinkAds.Api
client.showDebuggerUI();
}
public static void showDebuggerUI(string debugKey)
{
client.showDebuggerUI(debugKey);
}
public static void setGDPRLevel(int level)
{
client.setGDPRLevel(level);

View File

@@ -10,6 +10,7 @@ namespace AnyThinkAds.Common
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();

View File

@@ -163,6 +163,7 @@ namespace AnyThinkAds
public void setWXStatus(bool install) { }
public void setLocation(double longitude, double latitude) { }
public void showDebuggerUI() {}
public void showDebuggerUI(string debugKey) {}
}
class UnityBannerClient:IATBannerAdClient

View File

@@ -153,7 +153,7 @@ namespace AnyThinkAds.Android
try{
if (bannerHelperMap.ContainsKey(placementId)) {
this.bannerHelperMap[placementId].Call ("showBannerAd", rect.x, rect.y, rect.width, rect.height, mapJson);
this.bannerHelperMap[placementId].Call ("showBannerAd", rect.x, rect.y, rect.width, rect.height, mapJson, rect.usesPixel);
}
}catch(System.Exception e){
System.Console.WriteLine("Exception caught: {0}", e);

View File

@@ -373,11 +373,15 @@ namespace AnyThinkAds.Android
}
public void showDebuggerUI() {
showDebuggerUI("");
}
public void showDebuggerUI(string debugKey) {
try
{
if (this.sdkInitHelper != null)
{
this.sdkInitHelper.Call("showDebuggerUI");
this.sdkInitHelper.Call("showDebuggerUI", debugKey);
}
}
catch (System.Exception e)

View File

@@ -200,5 +200,10 @@ namespace AnyThinkAds.iOS {
Debug.Log("Unity:ATSDKAPIClient::showDebuggerUI()");
ATManager.showDebuggerUI();
}
public void showDebuggerUI(string debugKey)
{
//TODO 待iOS支持线上测试的SDK版本上线
}
}
}