void AuthenticateCallback(bool success, string error) { gameObject.SetActive(false); if (success) { GooglePlayGameServiceManager.LoadFromCloud(this, "EnterButton"); Debug.Log("USERNAME : "******"Not implemented on this platform") { Repository.sData["Nickname"] = "TEST"; Repository.sData["Record"] = "32"; Repository.fLoading = true; } else { Debug.Log("오류 : " + error); gameObject.SetActive(true); ShowAlert(error); return; } ShowAlert(""); enterButton.SetActive(true); }
public void Login() { se.GetComponent <AudioSource>().clip = buttonSe; se.GetComponent <AudioSource>().Play(); Social.localUser.Authenticate((bool success) => { if (success) { GooglePlayGameServiceManager.LoadFromCloud(this, "EnterButton"); Debug.Log("USERNAME : "******""); gameObject.SetActive(false); enterButton.SetActive(true); } else { ShowAlert("로그인에 실패했습니다"); } }); }
public void ToLobby(Text nickname) { se.GetComponent <AudioSource>().clip = buttonSe; se.GetComponent <AudioSource>().Play(); if (nickname.text == "") { ShowAlert("닉네임을 입력해주세요"); } else if (nickname.text.Length > 6) { ShowAlert("6글자 이내로 입력해주세요"); } else if (Social.localUser.authenticated) { GooglePlayGameServiceManager.SaveToCloud("Nickname," + nickname.text); GooglePlayGameServiceManager.LoadFromCloud(this, "EnterButton"); Debug.Log(Repository.sData["Nickname"]); SceneManager.LoadScene("LobbyScene"); } }