Search Issue Tracker
Fixed in 2022.1.X
Votes
0
Found in
2018.4
2019.4.7f1
2021.1
Issue ID
1278866
Regression
No
[Other] Recorded large 'int' values in AnimationClip are not preserved
How to reproduce it:
1. Open attached project '1278866.zip'
2. Load '[Test] Record Clip' from 'Assets' folder
3. Enter Play mode and let this scene play until it ends
4. Check recorded values in the Console window
5. Load '[Test] Play Clip' from 'Assets' folder
6. Enter Play mode
7. Check observed values in the Console window
Expected result: 'Test Animation Clip' AnimationClip preserves large 'int' value and prints the same value as recorded
Actual result: 'Test Animation Clip' AnimationClip doesn't preserve large 'int' value and prints the different value
Reproducible with: 2018.4.28f1, 2019.4.13f1, 2020.1.10f1, 2020.2.0b8, 2021.1.0a2
Notes:
- 'Test Animation Clip' prints '-869495424' instead of recorded int value - '-869495431'
- 'Test Animation Clip' AnimationClip preserves large 'double' and other types of value
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
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
- White lighting artifact when a point light with a small emission range and "Hard Shadows" touches an object while a directional light with "Soft Shadows" and another point light are present
Resolution Note (fix version 2022.1):
Fixed in 2022.1.0a12
Int curves are not supported in animation clip, see here: https://docs.unity3d.com/2021.2/Documentation/Manual/animeditor-AnimationCurves.html for a list of types that are supported.
Under the hood, int values are converted to float values, so for numbers above 16777216, there is an imprecision.
You can see that the bug is caused by a float conversion using this website: https://www.h-schmidt.net/FloatConverter/IEEE754.html
Entering '-869495431' yields the expected '-869495424' value.
Update : It only works for discrete attribute int now.
This means Enum types will work, as well as the types that have the attribute [discreteAttribute]