using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class DeathLevelChange : MonoBehaviour { float timer = 0; public float delay = 3; // Start is called before the first frame update void Start() { } // Update is called once per frame void Update() { timer += Time.fixedDeltaTime; if(timer >= delay) { if(DataManager.presentLevel == 1) { //change the scene names to your game scene names SceneManager.LoadScene("SampleScene"); } else if(DataManager.presentLevel == 2) { //change the scene names to your game scene names SceneManager.LoadScene("Level1"); } //add more else ifs for each of your levels } } }