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
- GfxDevice::UpdateBufferRanges when running UIBuilder tests
- [Android][BiRP] Depth processing is handled incorrectly on certain Android devices when using 2 camera's
- [APV] Cancelling Display Dialog Error is thrown after Adaptive Probe Volumes tab is open in Lighting Window
- [APV] NullReferenceException is thrown when baking Adaptive Probe Volume for a Terrain with Non-GI Contributing Tree Prototypes and multiple APV objects with different LayerMasks are present on the scene
- Hands are not recognized when using Hololens 2
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]