{Easy question} How to disable script from other gameObject.

Hi,how can i disable script that is in other game object,like it founds that gameobject where is located that script,what i need to disable,and disables it.

Unity Gems is a good resource for this sort of thing.

They have a good tutorial on script interaction: unitygems.com - unitygems Resources and Information.

Every script that inherits from monobehaviour has a variable called “enabled”.

You would essentially find that object, use getcomponent, and set “enabled” to false.

C# Example:

GameObject.Find(“Player”).GetComponent.enabled = false;