Destroy game object on button click (unity tutorial)

Опубликовано: 17 Март 2025
на канале: SCRYPT
1,439
10

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