Hi, I tried to check if the user already has a Display Name with GetAccountInfo then if the user does not have a Display Name, I ask the user to enter Display Name using UpdateUserTitleDisplayNameRequest. However before the user have a chance to enter the Display Name. It goes straight to error "Invalid Input Parameter". Please help me, thank you
the code is as follows:
// Use this for initialization void Start() { RegisterDisplayNameCanvas.SetActive(false); MainMenuCanvas.SetActive(false); PlayFabClientAPI.GetAccountInfo(new GetAccountInfoRequest() { }, result => { if (result.AccountInfo.TitleInfo.DisplayName != null) { MainMenuCanvas.SetActive(true); DisplayNameText.text = result.AccountInfo.TitleInfo.DisplayName; PhotonNetwork.playerName = DisplayNameText.text; } else if (result.AccountInfo.TitleInfo.DisplayName == null) { RegisterDisplayNameCanvas.SetActive(true); RegisterDisplayName(); } }, error => { Debug.LogError(error.ErrorMessage); }); void RegisterDisplayName() { PlayFabClientAPI.UpdateUserTitleDisplayName(new UpdateUserTitleDisplayNameRequest() { DisplayName = DisplayNameInputField.text }, success => { PhotonNetwork.playerName = success.DisplayName; }, failure => { Debug.Log(failure.ErrorMessage); //this is line 106 }); } the error message is below: Invalid input parameters UnityEngine.Debug:Log(Object) ConnectToGame:<RegisterDisplayName>m__3(PlayFabError) (at Assets/Scripts/ConnectToGame.cs:106) PlayFab.Internal.<MakeApiCall>c__AnonStorey1:<>m__0(String) (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:110) PlayFab.Internal.<PostPlayFabApiCall>c__Iterator0:MoveNext() (at Assets/PlayFabSdk/Shared/Internal/PlayFabHttp/PlayFabWWW.cs:173) UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)