public void Start() { if (PlayerPrefs.HasKey("username")) { if (PlayerPrefs.GetString("username") != "") { PanelA.SetActive(false); PanelLogedIn.SetActive(true); welcome.text = "Welcome " + PlayerPrefs.GetString("username") + "!"; } } }
public void OnLogin(bool _success, string _message) { if (_success) { Debug.Log("YOU JUST LOGED ING SUCCESFULLY WOOOOO, HELLO " + _message); PanelLogin.SetActive(false); PanelForm.SetActive(false); PanelLogedIn.SetActive(true); welcome.text = "Welcome " + PlayerPrefs.GetString("username") + "!"; } else { Debug.Log("WTF ERROR: " + _message); error.text = _message; } }