script cant access class values?

So its probably something very silly, but Im making a tutorial for my game that should run only if the player highscore is lower than 3 . First I made the tutorial script:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class Tutorial : MonoBehaviour
{
    public SaveState state;
    public GameObject textContainer;
    public Text tutorialText;

    void Start() {
        if (state.highScore <= 2) {
            StartCoroutine(RunTutorial());
        }
        if (state.highScore > 2) {
            Destroy(tutorialText);
            Destroy(gameObject);
        }
    }

    IEnumerator RunTutorial() {
        yield return new WaitForSeconds(1.5f);
        Time.timeScale = 0;
        textContainer.SetActive(true);
        tutorialText.text = "Test tutorial text";
    }
}

And the highScore int is stored in this class along with other values:

public class SaveState
{
    public int highScore = 0;
    public int skinsOwned = 0;
    public int coins; //total coins player has.
    public int allScore = 0; //All time score counter, every time you score, allScore++, until you unlock the next reward.
    public bool[] unlockableSkins = new bool[] { false, false } ;
    public bool[] hiScoreSkins = new bool[] { false} ;
}

The problem is, the Tutorial script cant find the highScore int, so nothing happens. If I run “RunTutorial” without the if statement, it runs normally.

go wrtie this in your SaveState class:


    public static SaveState saveState;

The in your Tutorial class access HighScore like this

       SaveState.saveState.highScore

Make your SaveState class static

public static class SaveState
{
    public static int highScore = 0;
    public static int skinsOwned = 0;
    public static int coins; //total coins player has.
    public static int allScore = 0; //All time score counter, every time you score, allScore++, until you unlock the next reward.
    public static bool[] unlockableSkins = new bool[] { false, false };
    public static bool[] hiScoreSkins = new bool[] { false };
}

Notice how everything has a static modifier, even the class declaration.
_
Then in you Tutorial script, remove the line public SaveState state; - you don’t need this. You can now just access the ‘highScore’ variable directly with SaveState.highScore

 void Start()
 {
        if (SaveState.highScore <= 2)
        {
            StartCoroutine(RunTutorial());
        }
        if (SaveState.highScore > 2)
        {
            Destroy(tutorialText);
            Destroy(gameObject);
        }
 }