A quick question about animation frames

I am rather curious if it’s at all possible to obtain the current playing frame of a gameobject’s animation in a script. This would be very helpful to synchronize damage arrays with the frame, so certain frames do certain damages. If not, Does anyone have any suggestions on how that or something similar could be done?

Animations in Unity are time based. all movement is interpolated based on the animation time. There is no “current” frame, the animation is always in between two keyframes. Animations consists of keyframes but they are just the “guidline” for the animation.

What you can do is: setup AnimationEvents to do something at a specific moment,
or check AnimationState.time yourself.