BestTime save in PlayerPrefs

Hello! In the game I’m working on, I have a timer, which has to stop when you finish the level. The problem is, I don’t know how to make the best time, be saved in player prefs, and between scenes, that is to appear example in the “menu” scene the best time in the “Level1” scene. (I’ve been creating games for 1 year, and I don’t know much)

{
    public Text timer;
    public float time;
    float msec;
    float sec;
    float min;

    public void WatchStart()
    {
        StartCoroutine("StopWatch");
    }
    public void WatchStop()
    {
        StopCoroutine("StopWatch");
    }


    IEnumerator StopWatch()
    {
        while (true)
        {
            time += Time.deltaTime;
            msec = (int)((time - (int)time) * 100);
            sec = (int)(time % 60);
            min = (int)(time / 60 % 60);

            timer.text = string.Format("{0:00}:{1:00}:{2:00}", min, sec, msec);

            yield return null;

            PlayerPrefs.SetFloat("min", min);
            PlayerPrefs.SetFloat("sec", sec);
            PlayerPrefs.SetFloat("msec", msec);
        }
    }
}

6741043--776845--upload_2021-1-19_19-3-0.png

Here’s an example of simple persistent loading/saving values using PlayerPrefs:

Useful for a relatively small number of simple values, such as a best time.