how to disable a component through code unity code example
Example: enabling and disabling components unity
//Enable or disable a component in Unity example:
component.enabled = false;
//Enable or disable a component in Unity example:
component.enabled = false;