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
- Constant console errors when using Min/Max Slider in PlayMode
- The global scene list is overridden in a project built with command line when the Override Global Scene List setting is disabled in the build profile
- [Linux] AutoLocale log is logged when opening a project
- Global Scenes are not included in the Build when building multiple Build Profiles at the same time
- [iOS] WebCamDevice.availableResolutions returns a single resolution with width and height both 0 on some iOS devices
Resolution Note:
Fixed by https://issuetracker.unity3d.com/product/unity/issues/guid/UUM-58573