Search Issue Tracker
By Design
By Design in 2023.2.X
Votes
0
Found in
2021.3.21f1
2022.2.11f1
2023.1.0b8
2023.2.0a6
Issue ID
UUM-30776
Regression
No
Bones are altered before an animation when using keepAnimatorStateOnDisable()
Reproduction steps:
1. Open the “Timeline 2D Bones Root Motion Animation Test” Project
2. Open the “Assets/Scenes/SampleScene.unity” Scene
3. Enter the Play Mode
4. Press the “Play Timeline” button and observe the animation
Expected results: The animations are played smoothly
Actual results: The Unit1 GameObject’s bones are altered before each animation
Reproducible with: 2021.3.21f1, 2022.2.11f1, 2023.1.0b8, 2023.2.0a6
Could not test with: 2020.3.46f1 (Problem detected while importing the Prefab file: 'Assets/Units/Unit1/Unit1.prefab'. The file might be corrupt or have missing nested Prefabs)
Reproducible on: Intel MacOS 13.2.1
Note: Uncommenting line 19 in the “Assets/Scripts/TimelineAbility.cs” Script prevents the issue
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
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note:
The documentation on keepAnimatorStateOnDisable is confusing and needs to be fixed, but the true behaviour is to restore the values from when the animated GameObject was initialized, which are called default values, and not the last animated values. The problem in the project is that playing that specific timeline upon pressing the button actually changes the current set of transforms being animated. That means the default values, which maps to the previous set of transforms, are not compatible anymore with this new set. So applying these default values leads to the alteration mentioned in the issue, since the values are not applied to the right transforms.
Resolution Note (2023.2.X):
The documentation on keepAnimatorStateOnDisable is confusing and needs to be fixed, but the true behaviour is to restore the values from when the animated GameObject was initialized, which are called default values, and not the last animated values. The problem in the project is that playing that specific timeline upon pressing the button actually changes the current set of transforms being animated. That means the default values, which maps to the previous set of transforms, are not compatible anymore with this new set. So applying these default values leads to the alteration mentioned in the issue, since the values are not applied to the right transforms.