Hi, I have a problem I have been banging my head against for over an hour now. SendMessage is not working. I have a code of line above it EXACTLY THE SAME (exception of variable changes), and it works perfectly but not this one. Here is the code:
hit.transform.SendMessage("NewRange", newRange, SendMessageOptions.DontRequireReceiver);
And reciever:
function NewRange (newRange : int) {
range = newRange;
}
I can’t do GetComponent because this is an instantiated enemy, there are more in the scene like them.