Beispiel #1
0
    public void OnClickCreateAccount(TMP_InputField newPlayerName)
    {
        if (string.IsNullOrEmpty(newPlayerName.text))
        {
            TextMeshProUGUI messageText = newPlayerName.transform.parent.Find("Error Text").GetComponent <TextMeshProUGUI>();
            messageText.text = "Field is empty";
            return;
        }

        string newCustomId = PlayerPrefsManager.GetRandomCustomId();

        PlayerPrefsManager.SetPlayerCustomId(newCustomId);
        deviceLogin.CreatePlayFabAccount(newCustomId, newPlayerName.text);
    }
Beispiel #2
0
 public void RetryAction(DeviceLogin deviceLogin)
 {
     Hide();
     if (action == "Login")
     {
         deviceLogin.LoginToPlayFab(PlayerPrefsManager.GetPlayerCustomId());
     }
     else if (action == "Create")
     {
         deviceLogin.CreatePlayFabAccount(PlayerPrefsManager.GetPlayerCustomId(), playerName);
     }
     else if (action == "Transfer")
     {
         deviceLogin.TransferPlayFabAccount(transferPasscode);
     }
 }