void Awake() { Checkpoint checkpoint = Persistor.Load(); if (checkpoint != null) { checkPointPresent = true; } if (checkPointPresent) { GetComponent <Button>().interactable = true; } }
public void LoadCheckpointScene() { Checkpoint checkpoint = Persistor.Load(); if (checkpoint != null) { SceneManager.LoadScene(checkpoint.sceneName); } else { Debug.Log("Checkpoint file not found."); } }