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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer 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 ArticleAnswer by static_cast
Please submit your own thread instead of digging, please. I call for the almighty mod to lock this.
View ArticleAnswer by Ayman32
**The answer. I tried this and is working. Jag har provat det och den fungerar. جربتُ هذا السطر و نجح معي GameObject.DestroyObject(gameObject);**
View Article
More Pages to Explore .....