Search Issue Tracker
Won't Fix
Votes
0
Found in
2019.4
2019.4.27f1
2020.3
2021.1
2021.2
2022.1
Issue ID
1347867
Regression
No
Sprites are not always added to Sprite Atlas when using SpriteAtlasExtensions.Add
How to reproduce:
1. Open the attached project
2. In the top toolbar, select Evo->Pack
3. Inspect the "ui_components" Sprite Atlas
4. In the top toolbar, select the Evo->Pack again
5. Inspect the "ui_components" Sprite Atlas again
Expected result: Sprites are successfully added to the Sprite Atlas
Actual result: Adding Sprites to Sprite Atlas fails either every or every second time
Reproducible with: 2019.4.29f1, 2020.3.14f1, 2021.1.15f1, 2021.2.0b4, 2022.1.0a2
Note:
- Inspector seems to show that Sprites are added until it's repainted
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:
Ensure to call AssetDatabase.SaveAssets after creating atlas and adding packables, e.g.:
atlas.Add(new []{ AssetDatabase.LoadAssetAtPath<Sprite>(assetPath) });
AssetDatabase.SaveAssets(); // <= Add SaveAssets to ensure changes are saved before being reset.