示例#1
0
    //void OnGUI()
    //{
    //    if (!_loginStarted)
    //    {
    //        if (GUI.Button(new Rect(20, 10, Screen.width - 20, 50), "Click To Login with Google", new GUIStyle{fontSize= 100}))
    //        {
    //            _loginStarted = true;
    //            GoogleLogin();
    //        }
    //    }
    //    else
    //    {
    //        if (!string.IsNullOrEmpty(_token))
    //        {
    //            GUI.Label(new Rect(10, 50, Screen.width - 10, 100), _token, new GUIStyle{fontSize= 100});
    //        }
    //        else if (!string.IsNullOrEmpty(_errorMsg))
    //        {
    //            GUI.Label(new Rect(10, 10, Screen.width - 10, 50), _errorMsg, new GUIStyle{fontSize= 100});
    //        }
    //    }
    //}

    #endregion

    #region Implementation

    void Start()
    {
        _pluginScript = AndroidGoogleSignIn.Init(this.gameObject);
        rg            = this.GetComponent <Register>();
    }
示例#2
0
    public void _SignIn()
    {
        var googleSignInScript = AndroidGoogleSignIn.Init(this.gameObject);

        googleSignInScript.SignIn(WEB_CLIENT_ID, GoogleSuccessCallback, GoogleErrorCallback);
    }
 void Start()
 {
     _pluginScript = AndroidGoogleSignIn.Init(this.gameObject);
 }