public void updateUsername() { string newName = userInput.text; if (newName.Length < 4 || newName.Length > 24) { GameManager.manager.notifyForSeconds("username must be between 4 and 25 characters", 3f); } else { PlayfabData.UpdateDisplayName(newName); } }
private static void registerAccount(string username) { var request = new RegisterPlayFabUserRequest { RequireBothUsernameAndEmail = false, Username = username, Password = "******" }; PlayFabClientAPI.RegisterPlayFabUser(request, result => { PlayfabData.UpdateDisplayName(username); loginWithUsername(username); }, error => { Debug.LogError(error.Error); GameManager.manager.isLoading = false; }); }