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
- “Readme” Asset is unreadable in the Inspector window when switching Editor Theme to Light
- “NullReferenceException” error thrown when switching Editor Theme to Light if “Unity Version Control” tab is enabled
- A Warning is displayed in the Inspector when a Mesh with any Material is added as a Terrain Detail
- [Android][Vulkan] Memory leak when playing and stopping a video using the Video Player on some devices
- Caret moves by a character when typing "." and any number into 'Grid and Snap' toolbar's input field
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]