Hello everyone.
I am so sorry. I had no idea what to name this thread. I know people have had the issue I’m having before. I read the forums that are on the issue. I’m getting a "“The name does no exist in current context error” but on a “MoseButtonDown” call. Not an a game object or asset. Every thread I saw hear had this error when referring to a game object in the code not…just code. I am so confused. Here is the snippet of code that is giving me trouble. Let me know if you need more.
void Update () {
if (iFrame == 0)
{
goHand.animation.Play("idle");
iFrame++
}
else if (Input.GetButtonDown (OnMouseDown))
{
goHand.animation.Stop();
iFrame++
}
v3DirectionRay = transform.TransformDirection(Vector3.forward);
}
It's part of a larger script. But in short what I'm trying to do here is have a hand and fore arm model play an idle animation while holding an axe model. And then throw the axe when play clicks the mouse. Any ideas why Mono Develop won't accept the on Mouse Button down function?
I actually have three errors at the moment:
-
The name "On Mouse ButtonDown does not exist in current context.
-
The best overloaded match for Unity engine input.get button.down string has invalid arguments.
-
Argument #1 Cannot convert object expression to type “string”
Thanks for any insight into the matter. Looking forward to hear thoughts.