I have two scripts main and joints.
I want to access functions and variables in joints from main.
I have a gameObject named MainObject which both scripts are attached to.
This is not working so far.
var myarray=new Array(); myarray="test";
var myjoints:joints; myjoints=GameObject.Find('MainObject').GetComponent(joints); Debug.Log(myjoints);//returns MainObject (joints); Debug.Log(myjoints.myarray);//returns out of index.
It seems like it finds the joints script but not any variables attached to the script.
Can anyone explain why this is not working?