How to display highscores 1-9 in a good way.

Alright, right now I save my highscores between 1-9 in my PlayerPrefabs.

I get them like this:

        private SortedList<string, int> GetHighScores()
        {
            SortedList<string, int> tempList = new SortedList<string, int>();

            for (int i = 1; i < 10; i++)
            {
                string tempName = "Highscore " + i;
                tempList.Add(tempName, PlayerPrefs.GetInt(tempName));
            }

            return tempList;
        }

but I would also like to display them in a good way, I guess I could make 1 text object for each highscore. But that seems pretty bad IMO. So what I’ve done so far is this:

        void OnGUI()
        {
            if (_showHighscore)
            {
                SortedList<string, int> highScoreList = GetHighScores();
                foreach (var score in highScoreList)
                {
                    GUI.Label(new Rect(20, 20, 100, 500),"

" + score.Key + score.Value);
}
}
}

How ever, doing it like that will just make it so all scores overlap.

This is probably due to the fact that you are not specifying a particular STYLE, to you GUI.Label function. A style like GUI.skin.textArea might give better results.

That being said: I’m not sure I understand what you have against doing this:

y=20;
foreach (var score in highScoreList)
    {
       GUI.Label(new Rect(20, y, 100, 40), score.Key + score.Value);
       y+=50;
    }