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); }
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); } }