Unity 2D Tutorial About How To Destroy Gameobject By Pressing UI Button.

preview_player
Показать описание
#UnityTutorial #SimpleUnityGame #unitydestroygameobject
This short Unity Tutorial is about how you can destroy any gameobject in your scene by pressing UI button. We will use buttons OnClick function.

TO BLAST! - My New Fun Relaxing Puzzle Game Available On Google Play Store

Consider purchasing my ULTIMATE UDEMY COURSE with great discount

If you like what I'm doing then you can support me through
or here
Thank you)

What this video is about and what it can be used for also: unity 2d tutorial,
Unity Tutorial About How To Destroy Gameobject By Pressing UI Button, unity destroy gameobject, unity destroy UI button, destroy gameobject button unity, unity destroy object, unity destroy, unity UI button, unity UI button onclick, unity destroy gameobject UI button, learn unity fast, unity tutorial, how to make games with unity, unity how to make game, unity how to make 2d game, not as good as brackeys but good as well.
Рекомендации по теме
Комментарии
Автор

Super, dzięki tobie można rozwijać się.

adamustv
Автор

Can you teach me how to delete a cloned gameObject (game object that is instantiate)?

wilmerandrecruzado
Автор

jeje good video alexander tutorial to get on a car or an animal but you have to buy it

martin
Автор

a quest can work the script so?



using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class AddUI : MonoBehaviour
{
[SerializeField]
GameObject objectToAdd;

public void AddGameObject()
{
Add(objectToAdd);
}
}



How can i Add a UI with a gameObject?
Thanks

pilotrl
Автор

Can you make the button destroy itself? If so, why did they not implement this for objects so they can do this? I want to make a object destroy itself yet I cant without destroying everything else.

Darkyahweh
Автор

How do you do it so the button enables the mouse to delete an object that you choose?

youtuberyoutuber
Автор

Sir i waited scene fade tutorial please create this

fastfun
Автор

Thank you very much for your videos, I like it and I subscribe.

I have a query, if I did not want to destroy the image with events, if not with code to handle many images to destroy and conditions, any idea how this could be achieved?

Thanks 👏 👏

sendostudiogames
Автор

Sir please make enemy that fallow the player and if player fire built than enemy destroy

m.wajahatgamez
Автор

hi. I instantiate 7 different boxes but later i want one of them to destroy randomly. I wrote that;
i= Random.Range(0, 7);
instantiate (box[0], transfor.position, transform, rotation);
...
instantiate (box[6], transfor.position, transform, rotation);
Destroy(box[i]);

but this doesnt work. Can you please help me?

alibalc
Автор

Hai how to destroy game object 1 by 1 on click button

syafiq
Автор

I want destroy object use tag
affects every scene

(scene 1)
(scene 2)
(scene 3)

object a1 in every scene was destroyed (thank you)
@Alexander Zotov

LordMiChaEl
Автор

or make that button destroy more images that are on the screen..

sendostudiogames