I have 2 objects in scene.
A with Otherscript.js component
Gameobject with NewBehaviourScript.js component
Otherscript.js inside code is like this
var foo = 5;
function DoSomething ( param : String)
{
print(param + " with foo: " + foo);
}
NewBehaviourScript.js inside code is like this.
var target : OtherScript;
function Update () {
target.foo = 2;
target.DoSomething(“Hello”);
}
question is this: I saved unity always tell me
The name ‘OtherScript’ does not denote a valid type. Why?
many thanks![/b]