How can you check for player input during specific frames of an animation?

I’m currently using animation events that call on a function that checks for mouse down, but it’s extremely brute force for what I’m trying to do and requires too much precision in timing to make it functional for a human being. However, I don’t have enough experience with Unity to come up with a different method.

[I’m programming a very simple jump rope game, and I’m trying to check to see if the player has clicked at the right time to perform a successful jump.]

Any suggestions?

In your case, I suggest you use animation events to set a flag to your script, and check for player input in the Update function. If the player press the mouse button down when the flag is true, he proceed, otherwise it’s a game over.

public bool RightTime = false;

void Update ()
{
	if(Input.GetMouseButton(0))
    {
        if (RightTime)
        {
            // player pressed the left mouse button at the right time
        }
        else
        {
            // player missed
        }
    }
}

Then use the animation event of your animation to set RightTime.