How to view a list of existing material instances

I have recently created a script that would adjust the tiling of a material based on the object’s scale. This script is executed in editor so that I dont have to run the game every time I want to see how the game looks.

I used Resources.UnloadUnusedAssets (); to clean up any Materials generated that are no longer in use. But I cant be sure if this is working or not. I need to be able to see all the material instances in order to confirm that everything is working properly. How do I view the instances of my material?

I believe I understand what you’re asking.

Find the material in the project panel and right click it. Click on find references in scene. You’ll find that the scene panel will go black and white, minus the objects that utilize that material. Also, if you look in the hierarchy, the search bar will say


The only objects that use the material will be listed in the hierarchy as well. I hope this cleared things up.

I am gonna necropost but since I haven’t found answer for this anywhere else I think it would be useful to post it here:

What I did is to turn on the Profiler (Window → Analysis → Profiler), disable all the modules except the Memory module, disable all the options in the Memory module except the Memory count, and run the scene in the editor. This way you can see at any given moment what was the instantiated memory count.

Mind you, materials in Resources folder are also loaded in memory so they will also show in the Profiler.

Hope this helps someone.