Disabling and Removing Components During Gameplay
Enabling and Disabling Components
public GameObject thing;
public Transform thingTransform;thing.GetComponent<Collider>().enabled = true;thing.GetComponent<Collider>().enabled = false;Removing Components
Using the Destroy() FunctionAvoiding Errors
Accessing Components Through ScriptsCreating Custom Components and ScriptsLast updated