Is there a way to find a list of all references to a given object during runtime?
I’m trying to call Resources.UnloadUnusedAssets but unfortunately it doesn’t work for me which means that there are still active references to those assets somewhere. The assets AREN’T used in the scene so I’m probably keeping a reference of them somewhere in the code. However, I have no idea where that could be and reading through the code has proven useless so far. I need a way to find the potential references that might have been created and unlink them so that I can clean up the unused assets.
If you open the profiler and go to memory then click on simple and change to ‘detailed’ it’ll give you the option of showing all object references and where they’re referenced from. (you need to click ‘take sample’)
This is exactly what I needed. I thought that I would need to write a script for it like @BlackPete suggested but since the profiler can the referenced assets, this is even better! Thanks!