android 登录 + 支付 + GA 通了
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using UnityEngine;
|
||||
|
||||
@@ -6,6 +7,7 @@ namespace tysdk
|
||||
|
||||
public static class UnityBridgeFunc
|
||||
{
|
||||
|
||||
#if UNITY_EDITOR
|
||||
//初始化sdk
|
||||
public static void InitSDK(){}
|
||||
@@ -51,8 +53,7 @@ namespace tysdk
|
||||
|
||||
public static void UnityLoadRvADS(){}
|
||||
|
||||
public static void UnityShowRVAD(){}
|
||||
|
||||
public static void UnityShowRVAD() { }
|
||||
|
||||
#elif UNITY_ANDROID
|
||||
|
||||
@@ -89,10 +90,11 @@ namespace tysdk
|
||||
|
||||
public static void UnityLogin(EAccoutType accoutType)
|
||||
{
|
||||
|
||||
var typeName = GetLoginTypeName(accoutType);
|
||||
Debug.LogError("typeName:::" + typeName);
|
||||
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
|
||||
{
|
||||
sdkManager.CallStatic("UnityLogin", accoutType);
|
||||
sdkManager.CallStatic("UnityLogin", typeName);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -193,6 +195,7 @@ namespace tysdk
|
||||
public static void UnityLoadRvADS(){}
|
||||
|
||||
public static void UnityShowRVAD(){}
|
||||
|
||||
|
||||
#elif UNITY_IOS
|
||||
|
||||
@@ -277,5 +280,24 @@ namespace tysdk
|
||||
[DllImport("__Internal")]
|
||||
public static extern int GetATT();
|
||||
#endif
|
||||
|
||||
public static string GetLoginTypeName(EAccoutType accoutType)
|
||||
{
|
||||
string str = String.Empty;
|
||||
switch (accoutType)
|
||||
{
|
||||
case EAccoutType.hwGoogle:
|
||||
str = EAccoutTypeName.hwGoogle;
|
||||
break;
|
||||
case EAccoutType.hwFacebook:
|
||||
str = EAccoutTypeName.hwFacebook;
|
||||
break;
|
||||
case EAccoutType.hwGuest:
|
||||
str = EAccoutTypeName.hwGuest;
|
||||
break;
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user