Unity component gets destroyed but is code example Example: unity remove component in script Destroy (gameObject);