Example #1
0
    void Awake()
    {
        Checkpoint checkpoint = Persistor.Load();

        if (checkpoint != null)
        {
            checkPointPresent = true;
        }
        if (checkPointPresent)
        {
            GetComponent <Button>().interactable = true;
        }
    }
Example #2
0
    public void LoadCheckpointScene()
    {
        Checkpoint checkpoint = Persistor.Load();

        if (checkpoint != null)
        {
            SceneManager.LoadScene(checkpoint.sceneName);
        }
        else
        {
            Debug.Log("Checkpoint file not found.");
        }
    }