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
- Builds fail with "System.IO.IOException: The file is too long" when building a specific project
- Meta Quest System Keyboard does not render text in its input field when typing
- UI Source Image property gets set to 'None' when using a specific Sprite and Play mode is entered
- Rendering locks up when not looking at a transparent material on Meta Quest 2
- Volumetrics break when using a Custom Pass to create a Thickness Buffer for Alpha Clipping
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