using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.SceneManagement; public class gameover_manager : MonoBehaviour { public void replay() { //(1)錯誤做法:把img1隱藏(如此,不會重新開始) //img1.SetActive(false); //(2)正確做法 SceneManager.LoadScene("SampleScene"); } }