how to disable script unity code example
Example 1: how to turn off scrips in unity
this.enabled = false;
Example 2: disable script in unity
GameObject.Find("Cube").GetComponent<MoveObject>().enabled = false;
this.enabled = false;
GameObject.Find("Cube").GetComponent<MoveObject>().enabled = false;