unity deactivate disables scripts code example
Example 1: how to deactivate objects through scripts in unity
public GameObject Name = GameObject.Find("Name");
Name.enabled = true;
Example 2: disable script in unity
GameObject.Find("Cube").GetComponent<MoveObject>().enabled = false;