In order to properly use a SpriteAtlas with AssetBundles you need to register to the atlasRequested event from SpriteAtlasManager and provide the SpriteAtlas once you load it. I believe I am doing this correctly but just end up with all of my UI being white squares.
I’ve read elsewhere that UGUI Images do not support late binding but they none of those posts were recent and I’m hoping this has been fixed by now and I’m just missing something. Has anyone successfully done this for UGUI Images or know of a workaround?
Are you sure this is the case? i am not familiar with SpriteAtlasManager since it’s probably an addition to one of the more recent versions of Unity, but is this really the way you’re supposed to work with it?
In the past, if you packed sprites into an atlas, they would already be included in the asset bundle so you don’t have to do any manual resolving yourself.
I am not sure how can you get a scenario where a sprite was packed into an atlas but it wasn’t included in the build (or is that a feature of the new sprite atlas system?)
@TheValar have you find the solution?
I met the same problem and I find this because of async-loading cause the action callback outside of the atlasRequested. Is there any solution for ugui, or back to using the tag solution?
Nope never found a solution for this Also have not heard anything about when this might be fixed. It kinda seems to me that Unity has abandoned UGUI for the time being
Thanks @liangpengcheng , however we are not instantiating our gameobjects but instead we are having them start in the scene and get their Image sprite from Late Binding from asset bundles