unity disable collider code example Example: unity desactivate collider gameObject.GetComponent<Collider>().enabled = false;