Exemplo n.º 1
0
    public void OnNameConfirm()
    {
        string input = GameObject.Find("InputField").GetComponent <InputField> ().text;

        if (input.Length > 0)
        {
            // save name for next time
            PlayerPrefs.SetString("Name", input);

            // submit name to leaderboard and retrieve data
            leaderboardData.UploadScore(input, Score.instance.getScore);

            // now show leaderboard
            switchToLeaderboardView();
        }
    }