Search Issue Tracker
By Design
Votes
0
Found in
2019.4.22f1
Issue ID
1321653
Regression
No
[2D] [Sprite Atlas] Missing sprite when using prefab from an Asset Bundle which includes Sprite Atlas & Sprite
[2D] [Sprite Atlas] Missing sprite when using prefab from an Asset Bundle which includes Sprite Atlas & Sprite
Myeongseon Kim: Hi team, I have a customer using a prefab from an asset bundle which includes sprite atlas & sprite at the same bundle, and he is facing the missing sprite issue. I figured out it is because Resources.UnloadUnusedAssets() frees the atlas. (It happened because he just enabled 'include in build' option and instantiated the prefab from asset bundle at run time, and then called UnloadUnusedAssets. There was no reference of any sprite in a scene that belongs to the atlas.) I recommended using late-binding instead of 'include in build' since it is automatically ignored, but I was wondering if this is designed. I think the reason he faces the issue is because he thought 'include in build' works like resource. If designed, could you share me if there is any further plan to show warning to users or disable the option once user builds a bundle? So... it's about UX
Steps To Repro:
The left-side button loads asset bundle and instantiates a prefab, and the right-side button calls UnloadUnusedAssets.
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
- Selector gets stuck in UI if scroll is used while dragging
- Created asset is placed in a new folder when creating a new folder and instantly creating an asset by clicking somewhere else
- Selecting and deleting transition in Animator does not add to Undo History when animation is previewed in Inspector
- GameObjects remain static when updating constraints of PhysicsJoint with "Enable Sleeping" selected in Havok Physics Configuration
- [iOS] Touch input is not clocked and UI is unresponsive when the application is paused mid-drag without lifting the finger
Resolution Note (2021.2.X):
For dynamic behavior, Late-Binding is recommended. In 2021.2, a fix has been added so that Sprite can rebind to Atlas Texture again.
Would request a quick test on the latest trunk please.