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
- The Scrollbar becomes unusable when adding Elements to the List
- "One or more data file missing for baking set NewScene Baking Set. Cannot load shared data." error in Player when a specific project is built
- Choosing new HDR Colour using RGB values breaks colour on Intensity Selectors
- Rendering/Decal Layer Mask options are different inside Prefab Mode and outside Prefab Mode when the project is upgraded to Unity 6
- Incorrect Realtime GI Light Probes baking when more than one Light Probe Group is used and "Baked Global Illumination" is enabled
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.