unity enable a script code example Example: enable script unity YourGameObject.GetComponent<YourScript>().enabled = true;