i want to invoke a method which is inside a script which is attached to the child of another gameobject. how can i invoke it from a script which is not on the same gameobject?
i guess i figured it out on my own
first i created an instance of the target script like this:
public targetscript variablename;
then in the hierarchy i dragged the gameobject which had my targetscript attached to it into the empty field of the current script.
and then i simply did variablename.methodname();