update:更新sdk 脚本

This commit is contained in:
2026-04-03 21:19:41 +08:00
parent db82fe0116
commit c0b6ccf7ed
3 changed files with 15 additions and 9 deletions

View File

@@ -15,8 +15,6 @@ namespace tysdk
{
public class AccountInfo
{
public const string hwVkid = "vk.global.app";
public int userId;
public string token;
public string jwtToken;
@@ -40,7 +38,8 @@ namespace tysdk
{"google", EAccoutType.hwGoogle},
{"fb", EAccoutType.hwFacebook},
{"tyGuest", EAccoutType.hwGuest},
{"ios13", EAccoutType.Apple}
{"ios13", EAccoutType.Apple},
{AccountString.hwVkid, EAccoutType.hwVkid}
};
private static EAccoutType ConvertAccoutType(string accountType)

View File

@@ -14,6 +14,12 @@ namespace tysdk
none
}
public static class AccountString
{
public const string hwVkid = "vk.global.app";
}
public class LoginInfo
{
public bool isSuccess;

View File

@@ -7,7 +7,13 @@ namespace tysdk
public static class UnityBridgeFunc
{
#if UNITY_EDITOR || UNITY_ANDROID
private static string EAccountTypeToStr(EAccoutType accountType)
{
return accountType == EAccoutType.hwVkid ? AccountString.hwVkid : accountType.ToString();
}
#endif
#if UNITY_EDITOR
//初始化sdk
public static void InitSDK(){}
@@ -62,11 +68,6 @@ namespace tysdk
public static void FBShareLink(string title, string content, string url) { }
public static void MessengerShareLink(string title, string content, string url) { }
private static string EAccountTypeToStr(EAccoutType accoutType)
{
return accoutType == EAccoutType.hwVkid ? TYSdkFacade.AccountInfo.hwVkid : accoutType.ToString();
}
#elif UNITY_ANDROID
private static string SDK_CLASS = "com.unity3d.player.SDKManager";