How would I call a function in a js script attached to a GameObject from a c# script.
the JSscript is attached to a GameObject named Cube.
I’m trying to do this so far in the C# script but it’s not working. I know how to do this from Js to Js but not C# to Js. Here’s my non-working code attempt.
public GameObject go;
public JSscript myscript;
void Start(){
go=GameObject.Find("Sphere");
myscript=go.GetComponent<JSscript>();
}
right now it doesn’t know what JSscript is.