Search Issue Tracker
By Design
Votes
5
Found in
2019.2.0b10
2019.2.0f1
2019.3.0a1
2020.1.0a1
Issue ID
1182179
Regression
No
SpriteAtlas doesn't load from Asset Bundle when reloading the scene
How to reproduce:
1. Open the attached project (case_1182179-Project.zip)
2. Open the scene labeled "AssetBundleLoadingTest"
3. Enter the Play mode
4. Press the "Load" button in Game View
5. Press the "Unload" button
6. Press the "Load" button again
Expected result: The sprites are rendered.
Actual result: The sprites are not rendered, they show up as white blocks.
Reproduced in: 2019.2.8f1, 2019.3.0b6, 2020.1.0a7.
Couldn't test with versions up to 2019.2.0b10. (UI elements are not compatible and Sprites keep disappearing)
Note: There are no problems loading the Scene for the first time
-
james_wong
Dec 22, 2020 03:51
Looks like Unity will not fix SpriteAtlas bug in a long time.
So, there is only one suggestion for SpriteAtlas: DONOT use sprite atlas, or your game will crash due to ui image memory issues.
-
as5405as
Jul 24, 2020 03:49
It's present in 2019.4.5f1 as wel,it can not trigger atlasRequested when sceen reload
-
belowthegam
Apr 28, 2020 05:12
It's present in 2019.3.1f1 as well. How was the workaround you used for this problem? I need to solve this as soon as possible.
-
michael_covert
Apr 23, 2020 18:49
If this is by design, I'm confused as to the intended workaround. I don't want to keep the asset bundle loaded forever, but after unloading the asset bundle, the SpriteAtlasManager.atlasRequested callback is never raised again, so I can't re-register the atlas when I later decide to reload it.
-
Syganek
Dec 03, 2019 23:12
It's present in 2017.4f34 as well.
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
- Standalone Player crashes with "TDerived GetOrLoad<TDerived>() where TDerived : T" when IL2CPP Code generation is set to "Faster (smaller) Builds"
- IndexOutOfRangeException and InvalidOperationException when logging XML string
- Script missing in "Assets/Settings/Mobile_Renderer/GlobalVolumeFeature" of "com.unity.template.urp-blank" template
- “Font Asset Creator - Error Code [Invalid_File_Structure]…“ error is logged when generating Font Assets from fonts with meta files from previous Editor versions
- Input.mousePosition returns (NaN, NaN, 0.00) when Scene view is opened
Resolution Note (2019.2.X):
SpriteAtlas is resolved only once during the load. For more dynamic behavior, please use the GetSprite API :
https://docs.unity3d.com/2020.1/Documentation/ScriptReference/U2D.SpriteAtlas.GetSprite.html