How can I change a public/inspector variable from a function? I left out where I call the function for simplicity sake. This code here is throwing an error:
// The Variable I am trying to change
var target : Transform;
function NavP1 ()
{
target = GameObject.FindWithTag ("NavP1").transform;
}
I have tried creating the variable inside the function and that seems to not work either. Thanks!