enable script unity 1

enable script unity

 YourGameObject.GetComponent().enabled = true;

Here is what the above code is Doing:
1. It’s getting the GameObject that the script is attached to.
2. It’s getting the script that is attached to the GameObject.
3. It’s enabling the script.

Similar Posts