Particle system with texture sheet animation: first frame is played again when particle dies


I’m spawning some particles that play an animation through the option “Texture sheet animation”, and it’s playing nicely, except that just before they die, the particles play the first frame of the animation again, for what seems to be just 1 frame.
The tiling is correctly set, animation plays with the whole sheet, Frame Over Time is a simple ramp, and Cycles is set to 1. I have to tried to change the system lifetime, the particle lifetime, well basically any setting that could be remotely related to the issue, without success.

Note: It doesn’t happen on all the particles. Those spawned by a burst have this issue, as well as those spawned through normal emission if the particle system doesn’t loop (and even when it’s looping for some of the particles, but not all…). Not totally sure about the exact repro, but I have repro it in an empty project without difficulty.

I find it highly odd that I couldn’t find anything on this issue already, since the problem is very obvious, so I just hope it’s not related to some obscure setting somewhere in Unity that I would have changed without wanting it…

Solved by Bgolus here:

His answer: When you have a 4x4 flip book that’s 16 frames. If you look at the curve it has 0 to 16, that means the curve is actually animating over 17 frames where if the curve actually gets to 16 it’ll loop back to the first frame for a moment. So take the last key and set it to 15.99 instead of 16.0.