All our UI sprites have packing tags specified and so are packed into various atlases. However I have noticed when profiling that there are small number (perhaps half a dozen out of several hundred) that appear in the profiler as individual sprites rather than as part of the atlas:
In this case HC_Element_Wheel_01 should be part of the the FrontEnd atlas - here are its import settings:
And if I look at the atlas I can see the sprite is being included:
One funny thing however is if I click on the sprite asset under the texture asset unity does not jump to the appropriate page on the atlas that the sprite is on:
This pattern seems to hold true for all the sprites which appear in the profiler as not part of an atlas (and this works correctly for the sprites that do show up as atlased in the profiler). I have tried to delete the atlas cache in case there was some wonky data in there to no avail.
Does anyone have any idea what might be going on here? I’m scratching my head a little here…
Did you find anything else interesting that’s related to all of these “stray” textures? for example, anything different about their import settings? Do they have any overrides for a particular platform? any different settings? is the packing tag spelled correctly without any extra chars, etc?
So while I have made a bit of progress I still have no idea how/why things are going awry (but the fact it does work sometimes suggests that the problem doesnt lie within my assets but within the build process itself)
Do you have any other system in place that uses these sprites? or that uses those textures in any complicated way that may be including them into the build ?
They are definitely being referenced and I expect them to be in the build (but atlased) - some of our atlases are referenced by assets that are part of asset bundles but these arent the ones that seem to be going wrong, those ones are just UI textures referenced either by prefabs or included in a scene.
On the first build after clearing the atlas cache they are, but on subsequent builds thing go wrong and they get included as ‘loose’ textures. Really weird…