Animation event firing twice

Unity ver: 2019.4.18f1

Hey folks. I have added a single event to an animation, like this:

However, when playing the scene, the animation event is firing twice each time (as the console shows with the “Flap!” log):

I’ve checked my setup and I just have a single script component on my game object (so no duplication) and a single event in the animation.

The animation itself is being played through a timeline, like so:

Any ideas why the event would be firing twice?

I believe I’m hitting against this issue, which was said to be fixed in 1.2.4.

However, my package manager is saying I’m on Timeline 1.2.18 and is ‘up to date’. How do I get 1.2.4?

1.2.18 > 1.2.4, so you should have the fix, unless it regressed after 1.2.4 along the way. If you want to try, you can install specific version manually. I see you’re using 2019, in that Unity version you do the following:

  • hit the + button in the top-left corner of package manager
  • choose the Add package from Git url... option (or something similarly named)
  • write or copy this in the text field: com.unity.timeline@1.2.4
  • hit enter or click on Add

This is why I shouldn’t write up issues before bed!

So what confuses me is if you look at the Timeline changelog here:

https://docs.unity3d.com/Packages/com.unity.timeline@1.4/changelog/CHANGELOG.html

This page is talking about versions 1.4.X & 1.5.X of the timeline…etc. How come I see 1.2.18?

Regarding the original issue, I can confirm it’s working fine in another scene of my game (the same animation event is only firing once), so it must be a setup thing on my part.

Resolved it. It was something to do with the loop settings on the animation clip itself, AND how the timeline was set to loop the clip. Too many things looping.

Turning off some of the loop options resolved it.