Quantcast
Channel: Answers for "Destroy the current GameObject?"
Browsing latest articles
Browse All 22 View Live

Answer by Jesus_Freak

Destroy(gameObject) does (should) gt rid of attached gameobjectFrom a diff object you could sayDestroy(gameObject.FindWithTag("tag"));Or something like that.

View Article



Answer by _Petroz

Destroy(gameObject) is the correct way to the GameObject your script is attached to.When using Destroy(gameObject), it seems I am no longer able to instantiate new ones if I kill off the only prefab on...

View Article

Answer by sriram90

this gameobject is nothing but in which gameobject you have placed that script...if you use Destroy(this.gameObject);it'll destroy the gameobject in which you have placed the...

View Article

Answer by B-rad

Have you tried: Destroy(this.gameObject);

View Article

Answer by majordillow

once you have destroyed it how can you make it respawn in for instance i have a crosshair that when you press the button to aim the crosshairs are destroyed but how do i get them to come back when you...

View Article


Answer by Unityart3dsMAX

Ok here you go This script goes with the gameobject that is Instantiating the gameobject. var bullet : GameObject; var backup : GameObject; function Update () { if(Input.GetKey("a")) backup =...

View Article

Answer by static_cast

Please submit your own thread instead of digging, please. I call for the almighty mod to lock this.

View Article

Answer by Ayman32

**The answer. I tried this and is working. Jag har provat det och den fungerar. جربتُ هذا السطر و نجح معي GameObject.DestroyObject(gameObject);**

View Article

Browsing latest articles
Browse All 22 View Live




Latest Images