Answers for "how to destroy in unity"

C#
9

unity destroy gameobject

// Destroy this gameobject
Destroy(gameObject);

// Kills the game object in 5 seconds
Destroy(gameObject, 5);

// Removes this script instance from the game object
Destroy(this);

// Removes the rigidbody from the game object
Destroy(GetComponent<Rigidbody>());
Posted by: Guest on January-12-2021
16

destroy gameobject unity

Destroy(this.gameObject);
Posted by: Guest on March-16-2020
2

how to destroy an object in unity

Destroy(gameObject);
Posted by: Guest on February-01-2021

Code answers related to "how to destroy in unity"

C# Answers by Framework

Browse Popular Code Answers by Language