Search Issue Tracker
Won't Fix
Votes
0
Found in [Package]
1.1.0, 1.2.2
Issue ID
1186016
Regression
Yes
Timeline animation stops before the last keyframe when it is an even number
Repro steps:
1. Open user attached "Timeline Bug" project and scene "SampleScene"
2. Press play
Expected result: Cube moves and then disappears on the last keyframe
Actual result: Cube moves and stays visible, the last keyframe is not played
Reproducible with: 2019.2.4f1, 2019.2.8f1, 2019.3.0b6, 2020.1.0a7
Not reproducible with: 2017.4.33f1, 2018.4.10f1, 2019.2.3f1
Reproducible with package versions: 1.1.0 (2019.2.4f1 and above), 1.2.2
Not reproducible with package versions: 1.0.0, 1.1.0 (2019.2.3f1 and earlier)
Note: With some even frames (for example 6, 12, 14, 60) animation plays as expected
Workaround: Setting the last frame of the animation to an odd number (19, 21..)
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- "Shader warning in 'Hidden/Light2D': implicit truncation of vector type" is thrown when building Universal 2D template
- AI Assistant breaks compilation of packages using System.Runtime.CompilerServices.Unsafe via auto-referencing
- Unity Hub checks the "Documentation" module by default on the 6.4 and 6.5 streams despite that it was unchecked with the previous installs
- Shortcut that toggles between Dopesheet and Curves Views in the Animation Window's Timeline is mislabed
- Property List Items Overlap onto the Property List's top edge when scrolling through a long Property List
Resolution Note:
The change that caused this was a fix the cause was infinite tracks returning a bad length (that contained rounding errors). The expected result here is actually that the last key is NOT evaluated.
But because it's a step curve, it can be evaluated due to timeline/playables having higher numerical precision for time values than animation clips.
There are two recommended solutions.
1) Change the timeline to a Fixed Length duration mode and set the duration of the timeline to the same as the last key. This can be done in the inspector of the timeline asset, which will highlight the length of the timeline being _slightly_ less than the key position.
2) Use an activation track to indicate the activeness of the gameObject instead of a step curve. The track can be set to automatically disable the object on stop. This is a more robust approach.