how to remove gameobject unity code example
Example 1: unity remove gameobject
Destroy(gameObject);
Example 2: unity remove component in script
Destroy (gameObject);
Example 3: how to destroy a gameobject in c#
Destroy(gameObject);
Example 4: how to destroy a gameobject after some hits in unity 3d
void OnCollisionEnter(Collision other) { hit += 1; checkhit(); }
Example 5: how to destroy a gameobject after some hits in unity 3d
void OnCollisionEnter(Collision YourGameobjectasAVarable) { if(YourGameobjectasAVarable.collider.tag == "YourGameObject'sTag") {