Is there a function that will return the current frame of an animation?

I want to be able to freeze my animation at a particular frame if the player is shooting rapidly. Something like this:

if (timeBetweenShots < 0.3f && timeBetweenShots > 0.0f && animator.GetCurrentFrame() == 20) 
{
	    animator.enabled = false;
}

I see there is a animator.GetCurrentAnimationClipState() but that doesn’t look like what I need, unless I’m mistaken.

Unity doesn’t think of animations in frames. Use either time or normalizedTime. Time is in seconds, normalizedTime is always a 0-1 percent (0.5 is half-way done.)

Say you want frame 6 out of 24. That’s normalizedTime 0.25. I think it uses 60 frames == 1 second, so would also be time=0.1.