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

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

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