here is an short tutorial on how to destroy game objects simply by clicking an button
here is the destroy script its a simple one
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Destroy : MonoBehaviour {
[SerializeField]
GameObject objectToDestroy;
public void DestroyGameObject()
{
Destroy (objectToDestroy);
}
}
music by evan king
• UPBEAT CHIPTUNE ♫ Amiga
if you have any questions or problems you can reach me out at-
instagram/gamer.programmer