Search Issue Tracker
By Design
Votes
0
Found in
2021.3.7f1
2022.1.11f1
2022.2.0b3
2023.1.0a4
Issue ID
UUM-11363
Regression
Yes
Keyframes are erroneously removed by Animation Compression when tangents are set to infinity
How to reproduce:
1. Open the attached project “IN_11563”
2. Double-click the Animation in the “FAR__CIN_020_L010” prefab
3. Navigate to the 'Curves' view in the Animation window and click on “Animator.SPEAR_01_cns ld”
4. Focus on the entire Curve by pressing 'f' while the Animation window is in focus
5. Click on the root of the “FAR__CIN_020_L010” prefab and in the Inspector set “Anim. Compression” to Optimal or Keyframe Reduction
6. Press Apply
7. Observe the Animation window
Expected result: No keyframes are removed from Curve. The shape of the Curve remains the same
Actual result: Keyframe is removed and the shape of the Curve is changed
Reproducible with: 2021.2.0a20, 2021.3.7f1, 2022.1.11f1, 2022.2.0b3, 2023.1.0a4
Not reproducible with: 2020.3.37f1, 2021.2.0a19
Reproducible on: Windows 10 Pro
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
- [2D] Spotlight 2D can get 'captured' by the sprite when shadows enabled
- Cannot navigate to Slider elements next to each other horizontally that require "Tab" key press on keyboard when using a gamepad controller
- Crash on Transform_CUSTOM_set_localScale_Injected when opening a Prefab that contains a script calling set_LocalScale during serialization
- [iOS] Player freezes with a warning "A new orientation transaction token is being requested while a valid one already exists" when orientation is changed during runtime on a specific devices
- Category is unselected when reverting changes in the Sprite Library Editor
Resolution Note:
After investigating the problem, we found out the issue is in fact caused by the `AssetPostprocessor` script added to this project. The script changes all tangents to be +infinity.
While this would have worked before, we introduced a change in behaviour for tangents in 2021.1: +infinity creates constant steps that use the value of the first key while -infinity creates constant steps that use the value of the second key.
Thus, the keyframe reduction works as intended here, but by changing all tangents to be +infinity in the AssetPostprocessor, we also change the shape of the curve. The issue can be avoided by reworking that AssetPostprocessor script.