update:更新BridgeFunc 的修改

This commit is contained in:
2026-04-21 21:51:20 +08:00
parent 6e7bd262de
commit c105818f00

View File

@@ -62,13 +62,15 @@ namespace tysdk
public static void FBShareLink(string title, string content, string url) { }
public static void MessengerShareLink(string title, string content, string url) { }
#elif UNITY_ANDROID
private static string EAccountTypeToStr(EAccoutType accoutType)
{
return accoutType == EAccoutType.hwVkid ? AccountInfo.hwVkid : accoutType.ToString();
}
#elif UNITY_ANDROID
private static string SDK_CLASS = "com.unity3d.player.SDKManager";
//初始化sdk
@@ -113,6 +115,7 @@ namespace tysdk
var accountInfo = EAccountTypeToStr(accoutType);
using(var sdkManager = new AndroidJavaClass(SDK_CLASS))
{
Debug.Log($"UnityLogin -> {accountInfo}");
sdkManager.CallStatic("UnityLogin",accountInfo);
}