Animating Hitboxes in Unity

I recently worked on a Video-Game for a game-jam. There I struggled a lot with the hitboxes and damage registration within Unity. But after a little bit of research, I found out how easy it is to Animate the hitbox within Unity. Therefore I now want to share this knowledge with you.

First you need to find your hitting animation of your character. This is usually hidden in the Animation column in the heading. There you add the variables you want to keyframe.

In my case I needed to reposition the hitbox and de/activate it, so the hits were only noticed when you wanted to hit.

Now the hitbox is always there where I want it.

In conclusion, when I found this easy fix to a problem which really bothered me while participating in the game jam I had mixed feelings. On the one hand I was annoyed that I didn't found this "trick" But the other it really impressed me and showed how capable Unity as an engine is. I look forward to use these options a lot more in my future projects. If you are into Game developing I really recommend that you should check it out.