unity deelete objec code example
Example 1: unity remove component in script
Destroy (gameObject);
Example 2: how to destroy a gameobject in c#
Destroy(gameObject); // destroys the game object attached to the script
Destroy (gameObject);
Destroy(gameObject); // destroys the game object attached to the script