Hello, I met Playfab in a short time and I have 2 questions about user logins. I would be glad if you help. I have a panel called Panel and it has items to register and login. The user can register and login without error. The first thing I want to do: When the user logs in, I close the panel, but when user open game again , this panel becomes active again. When the user logs in for the first time, I want the panel to be closed and this panel to be closed until the user presses the sign out button in the game. In short, I want to keep the user's username and password in memory until the user logs out. The second thing I want to do is: I have a text named isim. The isim is constantly in the upper left corner of the game. I want the username to turn into isim text and stay there forever. The code file I am using is as follows
using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using PlayFab; using PlayFab.ClientModels; using System; public class PlayFabManager : MonoBehaviour { [Header("UI")] public Text messageText ; public InputField usernameInput; public InputField emailInput; public InputField passwordInput; public GameObject Panel; public void RegisterButton() { if (passwordInput.text.Length < 6) { messageText.text = "Şifreniz en az 6 karakter içermelidir!"; return; } var request = new RegisterPlayFabUserRequest { Email = emailInput.text, Password = passwordInput.text, Username = usernameInput.text, RequireBothUsernameAndEmail = true }; PlayFabClientAPI.RegisterPlayFabUser(request, OnRegisterSuccess, OnError); } void OnRegisterSuccess(RegisterPlayFabUserResult result) { messageText.text = "Kayıt Yapıldı Ve Giriş Yapılıyor..."; } void OnError(PlayFabError error) { messageText.text = error.ErrorMessage; Debug.Log(error.GenerateErrorReport()); } public void LoginButton() { var request = new LoginWithPlayFabRequest { Password = passwordInput.text, Username = usernameInput.text }; PlayFabClientAPI.LoginWithPlayFab(request, OnLoginSuccess, OnError); } public void ResetPasswordButton() { var request = new SendAccountRecoveryEmailRequest { Email = emailInput.text, TitleId = "XXXX" }; PlayFabClientAPI.SendAccountRecoveryEmail(request, OnPasswordReset, OnError); } private void OnPasswordReset(SendAccountRecoveryEmailResult result) { // throw new NotImplementedException(); messageText.text = "Şifre Sıfırlama Bağlantısı Mail Adresinize Gönderildi"; } void OnLoginSuccess(LoginResult result) { messageText.text = "Giriş Yapıldı"; Debug.Log("Giriş Başarılı"); Panel.SetActive(false); } }