how to keep track of in what frame is your animation

So i want to damage an enemy when my player attack, but i can’t sync it with my attack animation. So the damage was done first then the animation plays out. My idea was to keep track in what frame is the animation. Any Idea how to keep track in what frame is your animation.

I use the percent point of the animation. If you want him to attack on the 10 frame of 20 then that would be 0.5.
Set the animation to play. Then have an IEnumerator which damages after a delay.
No need to get the frame data.
Get the length of the animation and multiply by the percent u want to damage at.
Use a yield return new WaitForSeconds ()
And wait the amount of time calculated until you damage.

Option #2
You can add events into the animation
You could then set at the right frame when to call Attack()
I believe for this, the function must be public.

If you need more help about my 2 methods just leave a comment.