Why can my highscore list only save one result?

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using System.IO;


public class ScoreItem
{
    float time;
    string playerName;

    public ScoreItem (float ti, string na)
    {
        time = ti;
        playerName = na;
    }

    public string GetName()
    {
        return playerName;
    }

    public float GetTime()
    {
        return time;
    }
}

public class Highscore : MonoBehaviour
{
    public UnityEngine.UI.Text prefabNameOutput;
    public UnityEngine.UI.Text prefabTimeOutput;

    public GameObject canvas;

    public static List<ScoreItem> highscore = new List<ScoreItem>();
    public static List<ScoreItem> highscoreManagment = new List<ScoreItem>();
    public static List<ScoreItem> highscoreSave = new List<ScoreItem>();



    private void Awake()
    {

        LoadList();
      
       
    }

    private void Start()
    {
       
      

        UnityEngine.UI.Text outputName;
        UnityEngine.UI.Text outputTime;

       
       
        foreach (ScoreItem temp in highscoreManagment)
        {
            outputName = Instantiate(prefabNameOutput);
            outputName.transform.SetParent(canvas.transform, false);
            outputName.GetComponentInChildren<UnityEngine.UI.Text>().text = temp.GetName();

            outputTime = Instantiate(prefabTimeOutput);
            outputTime.transform.SetParent(canvas.transform, false);
            outputTime.GetComponentInChildren<UnityEngine.UI.Text>().text = temp.GetTime().ToString();
        }
       

       
    }

 

    public void LoadList()
    {
        string filename;
        FileStream myFileStream;
        filename = Path.Combine(Application.persistentDataPath, "highscore.bin");

        if(File.Exists(filename))
        {
            Debug.Log("The File Exists");
            myFileStream = new FileStream(filename, FileMode.Open, FileAccess.Read);
            BinaryReader binaryfile = new BinaryReader(myFileStream);



            highscoreManagment.Add(new ScoreItem(binaryfile.ReadSingle(), binaryfile.ReadString()));
          



            binaryfile.Close();
            myFileStream.Close();

        }else
        {
            Debug.LogWarning("The File does not Exist");
        }



    }
public void SaveHighscore()
    {
        string filename;
        FileStream myFileStream;
        filename = Path.Combine(Application.persistentDataPath, "highscore.bin");
        myFileStream = new FileStream(filename, FileMode.Create);

        BinaryWriter binaryfile = new BinaryWriter(myFileStream);

        Highscore.highscore = new List<ScoreItem>();
        Highscore.highscore.Add(new ScoreItem(TimerSkript.pbTimer, Basic.playerName));

       

        foreach (ScoreItem temp in Highscore.highscore)
        {
          
            binaryfile.Write(temp.GetTime());
            binaryfile.Write(temp.GetName());
        }

        binaryfile.Close();
        myFileStream.Close();
    }

Looks like you can save as many as you want but you’re only reading one in your Load function.

You’ll want to save the Count of high scores in the file as well so your load function knows how many scores to read.

How can i do this

Rather than us typing in all the things already contained in publicly-available tutorials, I suggest you start there. Code / scripting is only a teeny-tiny part of the problem. Defining the data and setting everything up just-so is the bigger part.

6856313--799025--Screen Shot 2021-02-19 at 9.52.07 AM.png