diff --git a/Assets/PerfectWorld/Scripts/UI/Login/LoginScreenUI.cs b/Assets/PerfectWorld/Scripts/UI/Login/LoginScreenUI.cs index 36d0d24ca4..9430fc879a 100644 --- a/Assets/PerfectWorld/Scripts/UI/Login/LoginScreenUI.cs +++ b/Assets/PerfectWorld/Scripts/UI/Login/LoginScreenUI.cs @@ -35,6 +35,9 @@ namespace BrewMonster.UI { _loginButton.onClick.AddListener(OnLoginButtonClicked); context = SynchronizationContext.Current; + + _usernameInputField.text = PlayerPrefs.GetString("username", ""); + _passwordInputField.text = PlayerPrefs.GetString("password", ""); } // Update is called once per frame @@ -67,6 +70,9 @@ namespace BrewMonster.UI string username = _usernameInputField.text; string password = _passwordInputField.text; UnityGameSession.SetConnectionInfo("103.182.22.52", 29000); + PlayerPrefs.SetString("username", username); + PlayerPrefs.SetString("password", password); + PlayerPrefs.Save(); await UnityGameSession.Login(username, password, OnLoginComplete); }