Search Issue Tracker
Fixed
Votes
1
Found in
2022.3.14f1
2023.2.2f1
2023.3.0a16
Issue ID
UUM-57936
Regression
No
Sprite Resolver does not reset to default value when using an Animation State with Write Defaults
This issue happens because the sprite hash inside the Sprite Resolver component is animated using an int with DiscreteEvaluation attribute. When the played clip is finished, the animated int is set to 0 instead of being reset to its original value.
A simpler repro project and description of the problem can be found here:
[https://unity.slack.com/archives/C06TQ7L6A/p1701939855969839]
Reproduction steps:
1. Open the “ReproProject“ project
2. Open the "Assets/HappyHarvest/Scenes/House_Interior" scene
3. Enter Play Mode
4. Make sure the mouse cursor is below the “Character“ GameObject in the Game View
5. Observe the “Character“ GameObject’s shoe sprites in the Game View
6. Press the “W“ key on the keyboard
7. Repeat steps 4 and 5
Expected result: The shoe sprites are reset to the default sprites
Actual result: One shoe sprite is reset incorrectly, the sprite from the last used animation is visible instead
Reproducible with: 2022.3.14f1, 2023.2.2f1, 2023.3.0a16
Couldn’t test with: 2021.3.33f1 (compilation errors)
Reproducible on: Windows 11 Pro (22H2)
Not reproducible on: No other environment tested
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
- Search field in UI Builder's Library has no character limit
- Changing the value in UI Builder by dragging increases it by a few thousand points when reaching the borders of the screen
- ARM64 architecture DLL incorrectly copied instead of x64 when building for Windows x64
- Crash on TypeTreeIterator::GetNode when opening a specific folder
- Crash on WriteSerializedAssetsV2 when (re)entering the Play Mode in a specific project when IEnumerator Start() is used
Resolution Note:
Fixed by https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-58573