unity how to destroy component code example
Example 1: unity remove component
//Use Destroy() for removing components
Example 2: how t remove a component in unity
Destroy(GetComponent<TheComponentYouWantToDestroy>());
//Use Destroy() for removing components
Destroy(GetComponent<TheComponentYouWantToDestroy>());