Example #1
0
 public Task <bool> Login()
 {
     if (tcs == null || tcs.Task.IsCompleted)
     {
         tcs = new TaskCompletionSource <bool>();
     }
     WX.onRecvMsg += onRecv;
     WX.Login();
     return(tcs.Task);
 }
Example #2
0
 // Start is called before the first frame update
 void Start()
 {
     //string appid = "wx7e44f6f0cb921e85";
     //WX.RegisteApp(appid);
     WX.onGetUserInfo += (a, b) =>
     {
         Debug.Log("LoginOver");
     };
     GetComponent <Button>().onClick.AddListener(() =>
     {
         WX.Login("dddddd");
     });
 }