I would like to add a number of gameplay-related flags to my character animations, such as specifying the frames in an attack animation during which the character is invulnerable, or the frames in a jump animation during which the player has air control.
I’ve read about Animation Events, and considered using them to set/unset flags on another component attached to the character, but I’m concerned that there might be a performance issue if every animation fires events both to set and unset several flags.
I’ve also considered using Animation Curves and creating separate curves for each flag, but the docs specifically warn against using curves for gameplay logic because they may be resampled.
Has anyone used a large number of animation events to implement something similar? Is there a better way to accomplish this? Thanks!,