Sorry for posting what I’m sure has already been answered because it’s so basic, but I couldn’t find anything in the documentation or through searching the forums. (side question: anyone know how to get the forum search function to match an exact phrase instead of just individual words? Quotes don’t seem to make any difference)
Anyway, I’m trying to call a function in one script from a function in another script. (they could be combined, but I’m trying to get the basic proceedure figured out) Both scripts are attached to empty objects and placed in the scene.
Script A:
function Update(){
if(Input.GetButton(“Fire1”))
{
PrintThis();
}
}
Script B:
public function PrintThis(){
print(“print test message”);
}
So of course when I run the game I get the “Unknown identifier: ‘PrintThis’” error. Any hints or links to previous posts on this would be greatly appreciated. Thanks.