unity script enable disable code example Example: disable script in unity GameObject.Find("Cube").GetComponent().enabled = false;