[M] sync from n3-world

This commit is contained in:
2024-08-30 10:12:40 +08:00
parent d449fee825
commit 959d7d2cce
9 changed files with 16 additions and 18 deletions

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 339beab439a427b4b9e96b2accf2e146 guid: f7bdbdeda604c424a973aa7041e3c26b
TextScriptImporter: TextScriptImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@@ -1,5 +1,10 @@
unityStreamingAssets=.unity3d**STREAMING_ASSETS** org.gradle.jvmargs=-Xmx**JVM_HEAP_SIZE**M
org.gradle.parallel=true
unityStreamingAssets=**STREAMING_ASSETS**
android.useAndroidX=true android.useAndroidX=true
android.enableJetifier=true android.enableJetifier=true
org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8 # Android Resolver Properties Start
android.suppressUnsupportedCompileSdk=33 android.useAndroidX=true
android.enableJetifier=true
# Android Resolver Properties End
**ADDITIONAL_PROPERTIES**

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: 86d31d9e59f392d4b8538e7dcf812ec3 guid: 912dbed58f935174cb6d176108ee38ac
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: edc76530d8406f74787197e56949feb3 guid: 5d767120510450d4486a11ec20e9fa78
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@@ -1,5 +1,5 @@
fileFormatVersion: 2 fileFormatVersion: 2
guid: d2f880703e7cd08469817aea47e80830 guid: 6799ef31c0d9547429f7d9f65e728c3a
DefaultImporter: DefaultImporter:
externalObjects: {} externalObjects: {}
userData: userData:

View File

@@ -245,8 +245,6 @@ public class SDKManager {
public static void UnityKnowNew(String productId, String productPrice, String productName, String productCount, String prodorderId, String appInfo, String ptype) public static void UnityKnowNew(String productId, String productPrice, String productName, String productCount, String prodorderId, String appInfo, String ptype)
{ {
Log.e(TAG,"开始支付-----"+ "productId:" + productId+" "+ "productPrice:" + productPrice+" "+ "productName:" + productName +" "+ "prodorderId:" + prodorderId +" "+ "appInfo:" + appInfo +" "+ "ptype:" + ptype);
PayEventData.PayData payData = new PayEventData.PayData(); PayEventData.PayData payData = new PayEventData.PayData();
final PayEventData.PayReq mPayReq = new PayEventData.PayReq(); final PayEventData.PayReq mPayReq = new PayEventData.PayReq();
mPayReq.prodId = productId; mPayReq.prodId = productId;
@@ -334,14 +332,10 @@ public class SDKManager {
public static void GAReportParams(int type, String eventstr, String paramstr) public static void GAReportParams(int type, String eventstr, String paramstr)
{ {
Log.e(TAG,"GAReportParams : " + type + " \n" + eventstr + " \n" + paramstr);
SDKLog.i("GAReportParams : " + type + " \n" + eventstr + " \n" + paramstr);
ParamsBuilder paramsBuilder = ParamsBuilder.newInstance(); ParamsBuilder paramsBuilder = ParamsBuilder.newInstance();
Gson gson = new Gson(); Gson gson = new Gson();
Map<String, Object> map = gson.fromJson(paramstr, new TypeToken<Map<String, Object>>(){}.getType()); Map<String, Object> map = gson.fromJson(paramstr, new TypeToken<Map<String, Object>>(){}.getType());
for (String key : map.keySet()) { for (String key : map.keySet()) {
System.out.println("Key = " + key + ", Value = " + map.get(key));
if(!TextUtils.isEmpty(key) && map.get(key) != null){ if(!TextUtils.isEmpty(key) && map.get(key) != null){
paramsBuilder.append(key, map.get(key).toString()); paramsBuilder.append(key, map.get(key).toString());
} }

View File

@@ -146,7 +146,7 @@ namespace tysdk
public void Logout() public void Logout()
{ {
UnityEngine.Debug.Log("Logout"); UnityEngine.Debug.Log("Logout");
if(_accountInfo != null) return; if(_accountInfo != null)
{ {
UnityBridgeFunc.UnityLogOutByChannel(_accountInfo.channel); UnityBridgeFunc.UnityLogOutByChannel(_accountInfo.channel);
} }
@@ -396,7 +396,7 @@ namespace tysdk
string tycs = tyurl == defaultTyurl ? string tycs = tyurl == defaultTyurl ?
"https://hwcsh.tygameworld.com /template/appCancel/note.html" "https://hwcsh.tygameworld.com/template/appCancel/note.html"
: :
"https://customermanage-feature-test-web-test.tuyougame.cn/appCancel/note.html"; "https://customermanage-feature-test-web-test.tuyougame.cn/appCancel/note.html";

View File

@@ -19,7 +19,7 @@ namespace tysdk
=================================================*/ =================================================*/
//public async Task<PaymentInfo> Pay(string prodId, string prodPrice, string prodName, int count, string pType, string price_amount_micros =null) //public async Task<PaymentInfo> Pay(string prodId, string prodPrice, string prodName, int count, string pType, string price_amount_micros =null)
public async Task<PaymentInfo> Pay(SKUDetail prod, int count) public async Task<PaymentInfo> Pay(SKUDetail prod, int count, float usdprice)
{ {
if (!IsLoggedIn) return new PaymentInfo() { code = "-1", msg = "未登录" }; if (!IsLoggedIn) return new PaymentInfo() { code = "-1", msg = "未登录" };
@@ -35,7 +35,7 @@ namespace tysdk
//to base64 //to base64
extraInfo = System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(extraInfo)); extraInfo = System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(extraInfo));
var prodId = prod.ProdID; var prodId = prod.ProdID;
var prodPrice = prod.price; var prodPrice = usdprice.ToString();
var prodName = prod.title; var prodName = prod.title;
var pType = "googleiab.global.app"; var pType = "googleiab.global.app";

View File

@@ -137,7 +137,6 @@ namespace tysdk
public static void UnityKnowNew(string productId, string productPrice, string productName, public static void UnityKnowNew(string productId, string productPrice, string productName,
string productCount, string prodorderId, string appInfo,string pType) string productCount, string prodorderId, string appInfo,string pType)
{ {
Debug.LogError("[UnityKnowNew] pType:" + pType);
using(var sdkManager = new AndroidJavaClass(SDK_CLASS)) using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
{ {
sdkManager.CallStatic("UnityKnowNew", productId, productPrice, productName, sdkManager.CallStatic("UnityKnowNew", productId, productPrice, productName,