Search Issue Tracker
Fixed in 5.0.6
Votes
2
Found in [Package]
5.0.5
Issue ID
1337463
Regression
No
[2D] SpriteResolver generates garbage every few frames when playing an animation
How to reproduce:
1. Open the attached project's Scene labeled "SampleScene"
2. Enter the Play Mode
3. Open the Profiler window (Window->Analysis->Profiler)
4. Input SpriteResolver.LateUpdate in the search field
5. Scrub through the Profiler graph
6. Inspect the GC Alloc value under the SpriteResolver.LateUpdate call
Expected result: Garbage is not generated every few frames
Actual result: Garbage is generated every few frames
Reproducible with: 3.2.6 (2019.4.27f1), 5.0.5 (2020.3.10f1), 6.0.3 (2021.1.8f1, 2021.2.0a17)
Couldn't test with: 2.0.0-preview.3 (Sprite Resolver is not available)
Notes:
- In Unity 2020.3.10f1, 64B of garbage is collected and it's more frequent
- In Unity 2021.1.8f1, 2021.2.0a17, either 272B or 236B of garbage is collected and it's less frequent
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 5.0.6):
For Unity 2021.1 & Unity 2021.2 (2D Animation 6.x and 2D Animation 7.x)
Sprite Resolver is only generating garbage if using an Animation Clip which animates Sprite Resolver and is created in Unity 2020.3 or earlier.
A solution would be to upgrade your clips to animate SpriteResolver.SpriteKey instead of SpriteResolver.Category & SpriteResolver.Label. This will solve the garbage generation.
Resolution Note (fix version 5.0.6):
Fixed in Unity 2020.3.14f1