Finding sprite references in scene with Memory Profiler

I am trying to optimize sprite atlases by using the memory profiler. We have many atlases loaded into memory and some of them only have references to a few objects in the scene. Therefore it would be nice to get an overview over how many objects each atlas references so that we can group them more efficiently.

By using the memory profiler I can get an overview of what a sprite atlas is referenced by:

Sprite->SpriteAtlas->Sprite(->SpriteRenderer)
8710047--1176870--upload_2023-1-6_14-33-11.png

I am only interested in the references to SpriteRenderers, so the question is if it is possible to filter these references so that I can easily see which sprite atlas have references to SpriteRenderers without having to open every hierarchy?

Hello Mike,

Thank you for raising this use case. There is no way to currently do what you want, but I've filed a feature request on your behalf via the Public Roadmap for Profiling.

Instead of filtering to just showing the used ones, I've assumed that for your use case it might be more relevant to see a clear differentiation of which Sprites in an Atlas (or similarly, which Assets from an Asset Bundle) are used, vs not used at any given time, given that the amount of unused one, and the overall utilization rate might be relevant to that workflow as well.
I hope that was in line with what you need?

1 Like

Yes, thank you for looking into this :) Seeing how many assets are used vs not used is definitely something we need as well. For now I have just made a small tool which uses Resources.FindObjectsOfTypeAll to find all Sprite Atlas and certain types of renderers and then compare sprites from each to see which ones are used and not used.

1 Like