UMG Timeline Events Trigger on Loop

I am running vanilla UE4 4.14 (preview) and it looks like UMG Timeline Events are triggered when an animation loops.

For example I have this simple timeline with an event triggered at 0.25s.

That event triggers a delegate which simply prints an incrementing number to the log.

So if I play that animation with no loops I see this in the log:

LogBlueprintUserMessages: [TestWidget] TIME LINE: 0

However, if I play the animation with 1 loop, I see this in the log:

125190-loop.png

LogBlueprintUserMessages: [TestWidget] TIME LINE: 0
LogBlueprintUserMessages: [TestWidget] TIME LINE: 1
LogBlueprintUserMessages: [TestWidget] TIME LINE: 2

If I play the animation with 2 loops, I see this in the log:

LogBlueprintUserMessages: [TestWidget] TIME LINE: 0
LogBlueprintUserMessages: [TestWidget] TIME LINE: 1
LogBlueprintUserMessages: [TestWidget] TIME LINE: 2
LogBlueprintUserMessages: [TestWidget] TIME LINE: 3
LogBlueprintUserMessages: [TestWidget] TIME LINE: 4

Based on the timing of when the extra calls are happening, it seems obvious that the event is triggered when animation sequencer returns to the start of the animation.

Hi Matthew,

Thank you for reporting this. I’ve been able to reproduce the issue, and I’m speaking to some folks about the best way to fix it. I’ll get back to you as soon as I have more info.

Best,

Cody

Hi Matthew,

I just submitted CL# 3202398, which includes some fixes to ensure events fire once per loop. I’ve noticed some corner cases where an event may not fire if it’s extremely close to the end of the animation, and filed a JIRA to continue investigating that. Let me know if that becomes a problem for you and I can take a look.

We recently refactored a lot of the sequencer tracks, so the changelist may be a bit different from your version. The important part is that we now set LastTimePosition = TimeCursorPosition whenever a loop occurs so that the evaluation range for the event track doesn’t include the entire track.

Best,

Cody