노마드코더 채널에 있는 유니티6강의 영상 보고 따라하는데 에러났거든?

찾아보니까 에러나도 실행은 정상적으로 된다던데 나는 에러를 해결해야만 실행된다고 떠서 질문함


a17a38ad290ab44caa33356258c12a3ae331c37ef9b30eb3c3c6e869

문제의 코드

using UnityEngine;
using UnityEngine.SceneManagement;

public enum GameState{
    Intro ,
    Playing,
    Dead
}

public class GameManager : MonoBehaviour
{
    public static GameManager Instance;
   
    public GameState state = GameState.Intro;
   
    public float PlayStartTime;
    public int lives = 3;
    [Header("References")]
    public GameObject IntroUI;
    public GameObject DeadUI;
    public GameObject EnemySpawner;
    public GameObject FoodSpawner;
    public GameObject GoldenSpawner;
   
    public Player PlayerScript;
    public TMP_Text ScoreText;

    void Awake(){
        if(Instance == null){
            Instance = this;
        }
    }
    // Start is called once before the first execution of Update after the MonoBehaviour is created
    void Start()
    {
        IntroUI.SetActive(true);
    }

    float calculateScore(){
        return Time.time-PlayStartTime;
    }

    void SaveHighScore(){
        int score = Mathf.FloorToInt(calculateScore());
        int CurrentHighScore=PlayerPrefs.GetInt("highScore");
        if(score > CurrentHighScore){
            PlayerPrefs.SetInt("highScore",score);
            PlayerPrefs.Save();
        }    
    }
    // Update is called once per frame

    void Update()
    {
        if(state == GameState.Playing){
            ScoreText.text="Score: "+Mathf.FloorToInt(calculateScore());
        }
        if(state == GameState.Intro && Input.GetKeyDown(KeyCode.Space)){
            state= GameState.Playing;
            IntroUI.SetActive(false);
            EnemySpawner.SetActive(true);
            FoodSpawner.SetActive(true);
            GoldenSpawner.SetActive(true);
            PlayStartTime = Time.time;
        }

        if(state == GameState.Playing && lives<=0){
           
            PlayerScript.KillPlayer();
           
            EnemySpawner.SetActive(false);
            FoodSpawner.SetActive(false);
            GoldenSpawner.SetActive(false);
            DeadUI.SetActive(true);
            state=GameState.Dead;
        }
        if(state == GameState.Dead && Input.GetKeyDown(KeyCode.Space)){
            SceneManager.LoadScene("Main");
        }
    }
}