Im using unity and I have Im trying to access a script called Outline on my parent object. I need to disable and enable the script Outline from another
Outline
If its on your parent object then:
myScript = gameObject.transform.parent.gameObject.GetComponent();
Other good Solution(cos performance is not critical here) by Hugo:
myScript = gameObject.GetComponentInParent;
Not in unity enviroment but i think in the second case gameObject is redundant.
gameObject