using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using UnityEngine.SceneManagement; public class Reset : MonoBehaviour { public Button m_ResetButton; // Start is called before the first frame update void Start() { m_ResetButton.onClick.AddListener(() => ButtonClicked()); this.gameObject.SetActive(false); } void ButtonClicked() { SceneManager.LoadScene("_Scene_0"); Time.timeScale = 1; this.gameObject.SetActive(false); } // Update is called once per frame void Update() { } }