using System.Collections; using System.Collections.Generic; using UnityEngine; public class LevelController : MonoBehaviour { [SerializeField] GameObject treasure; // Start is called before the first frame update public void ResetLevel() { Destroy(GameObject.Find("Boulder(Clone)")); Destroy(GameObject.Find("BoobyTrapSpawnPoint(Clone)")); Destroy(GameObject.Find("Treasure")); Instantiate(treasure); } }