Is it possible to turn off/suppress event calls in an animation at runtime?

Okay so I’m trying to make my animations as fluid as possible. I have a 2D Prefab consisting of various sprites to form one sprite where the parts can be moved around during animation. It also uses animation events to call a script that swaps the textures of the individual sprites during the animations, such as a hand opening and closing. The problem arises when I transition from one animation state to another. During the transition, it runs animation events from both animations, which sometimes causes the sprite to “spasm”, IE it starts to flicker between the sprites that the first animation wants, and the sprites that the second animation wants.

I could fix this by making the transition happen instantly, but that would make the animation less fluid. I’d just prefer that the first animation stops triggering events altogether to let the second animation’s events take precedence.

I don’t care if the solution is rather roundabout, it’s just that I’ve been wracking my brain for a while over this. Some new input could make me spring some new ideas.

Seems you can set the Animator fireEvents attribute manually.

 GetComponent<Animator>().fireEvents = false;

If roundabout is okay, just trigger a script at the beginning of each animation that sets a flag, which you use to decide which script calls to honor or ignore, inside those scripts themselves.