Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.SceneManagement; // Add this line for SceneManager
- public class DeathMenu : MonoBehaviour
- {
- public string mainMenuLevel;
- public void RestartGame()
- {
- FindAnyObjectByType<GameManager>().Reset();
- // GameManager.instance.RestartGame();
- }
- public void QuitToMain()
- {
- SceneManager.LoadScene(mainMenuLevel); // Replace Application.LoadLevel with SceneManager.LoadScene
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement