Hi everyone, I'm working on my first unity project, I'm trying to create a login panel but when i run the project I have this error:
"/Client/RegisterPlayFabUser: Invalid input parameters : One of the following properties must be defined: Password, EncryptedRequest"
what can cause this error? please help me!
using PlayFab; using PlayFab.ClientModels; using System; using UnityEngine; public class PlayFabController : MonoBehaviour { private string userEmail; private string userPassword; private string username; public GameObject loginPanel; public void Start() { //Note: Setting title Id here can be skipped if you have set the value in Editor Extensions already. if (string.IsNullOrEmpty(PlayFabSettings.TitleId)) { PlayFabSettings.TitleId = "1****"; // Please change this value to your own titleId from PlayFab Game Manager } var request = new LoginWithEmailAddressRequest { Email = userEmail, Password = userPassword }; PlayFabClientAPI.LoginWithEmailAddress(request, OnLoginSuccess, OnLoginFailure); } private void OnLoginSuccess(LoginResult result) { Debug.Log("Congratulations, you made your first successful API call!(loggato)"); loginPanel.SetActive(false); } private void OnRegisterSuccess(RegisterPlayFabUserResult result) { Debug.Log("Congratulations, you made your first successful API call! (registrato)"); } private void OnLoginFailure(PlayFabError error) { var registerRequest = new RegisterPlayFabUserRequest { Email = userEmail, Password = userPassword, Username = username }; PlayFabClientAPI.RegisterPlayFabUser(registerRequest, OnRegisterSuccess, OnRegisterFailure); } private void OnRegisterFailure(PlayFabError error) { Debug.LogError(error.GenerateErrorReport()); } public void getUserEmail(string s) { userEmail = s; } public void getUserPassword(string s) { userPassword = s; } public void getUsername(string s) { username = s; } public void OnClickLogin() { var request = new LoginWithEmailAddressRequest { Email = userEmail, Password = userPassword }; PlayFabClientAPI.LoginWithEmailAddress(request, OnLoginSuccess, OnLoginFailure); } }