[U] add PlayFab SDK and SNS login improvements
- Add PlayFabSDK as local package dependency - Add PlayFabTool.cs for PlayFab API integration - Implement LoginBySns method in TYSdkFacade - Add Android SNS login support in SDKManager and UnityBridgeFunc - Add Build Android With Debug menu option - Improve exception handling and timeout management 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -86,32 +86,51 @@ public class UnbindTest : MonoBehaviour
|
||||
{
|
||||
loginInfo = info;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void OnGetSns()
|
||||
{
|
||||
Debug.Log("========== Get SNS =============");
|
||||
using (var t = new AndroidJavaClass(Cls))
|
||||
{
|
||||
t.CallStatic("GetSns", accoutType.ToString());
|
||||
}
|
||||
using var t = new AndroidJavaClass(Cls);
|
||||
t.CallStatic("GetSns", accoutType.ToString());
|
||||
}
|
||||
|
||||
private void OnCheckSns()
|
||||
private async void OnCheckSns()
|
||||
{
|
||||
Debug.Log("========== Check SNS =============");
|
||||
using (var t = new AndroidJavaClass(Cls))
|
||||
try
|
||||
{
|
||||
t.CallStatic("CheckSns", accoutType.ToString());
|
||||
Debug.Log("========== Login by sns =============");
|
||||
message.text += $"Login {accoutType}\r\n";
|
||||
var info = await TYSdkFacade.Instance.LoginBySns();
|
||||
message.text = $"sns Login Success {info.isSuccess}\r\n";
|
||||
if(info.isSuccess)
|
||||
{
|
||||
loginInfo = info;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private async void OnBind()
|
||||
{
|
||||
Debug.Log("========== Bind =============");
|
||||
var linkResult = await TYSdkFacade.Instance.LinkAccount(accoutType);
|
||||
Debug.Log($"Bind Result Code:{linkResult.code}, UserId:{linkResult.userId}, bindInfo:{linkResult.bindInfo}");
|
||||
try
|
||||
{
|
||||
Debug.Log("========== Bind =============");
|
||||
var linkResult = await TYSdkFacade.Instance.LinkAccount(accoutType);
|
||||
Debug.Log($"Bind Result Code:{linkResult.code}, UserId:{linkResult.userId}, bindInfo:{linkResult.bindInfo}");
|
||||
if(linkResult.code == -1)
|
||||
{
|
||||
var info = await PlayFabTool.GetPFPlayerInfoBySDKId(linkResult.userId, "6DC6D");
|
||||
Debug.Log(info?.ToString() ?? "[UnbindTest::OnBind] info is null");
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Debug.LogException(e);
|
||||
}
|
||||
}
|
||||
|
||||
public void BindCallback(string message)
|
||||
|
||||
Reference in New Issue
Block a user