Beispiel #1
0
        private void Start()
        {
            if (PlayerPrefs.HasKey("screenName") && PlayerPrefs.HasKey("password"))
            {
                loggedIn = true;

                // player was logged in previously
                TextMeshProUGUI buttonText = accountButton.GetComponentInChildren <TextMeshProUGUI>();
                buttonText.text = PlayerPrefs.GetString("screenName");
                logInButton.SetActive(false);
                accountButton.SetActive(true);

                PlayFabAuthenticator.AuthenticateWithPlayFab(); // get a default device login
            }
            else
            {
                loggedIn = false;

                // player is not fully logged in
                logInButton.SetActive(true);
                accountButton.SetActive(false);
                PlayFabAuthenticator.AuthenticateWithPlayFab(); // get a default device login
            }
        }