Profiler showing GC in graph but not in Hierarchy?

Hi all,
I have some GC allocations reported in the Memory window (graph) but I do not see it in the Hierarchy.
I am deep profiling and am on Unity 2021.2.0f1 (yes, it’s an old version I know. I have my reasons).

Profiler export (if needed): https://kamgam.com/unity/DeepProfileMissingGC.zip
Maybe it’s just some toggle or option I am missing?

Thanks :slight_smile:

Hello,
Since you are profiling Playmode instead of a build Player, there might be allocations that only happen in the Editor (e.g. for generating UnityEngine.Object Nullcheck error messages with Editor only context information). Those are filtered out by default as they do not exist in a built player and would misdirect optimization efforts. You can disable that filtering by toggling off the Collapse EditorOnly samples option.

You might also get more info by switching the target to Editor.

Lastly, Hierarchy shows only one thread at a time, by default the main thread, but the memory Profiler Module shows allocations from all threads. You can either use the drop-down to go through all threads one by one, or switch to Timeline view and look for magenta samples in all threads

Thanks for all the tips. I had tried looking in all the threads (which is a bit cumbersome with the big dropdown) and did not find it. But that’s a long list so maybe I missed it.

Profiling the build was a great suggestion!

I does not shop up in builds so I assume it’s an editor only thing (despite me no being able to find it). Maybe I will take a closer look at the timeline but for now I am just happy it’s not in the build. Thank you :slight_smile: