I’m trying to automatically scan materials in my project from an editor script to find usages of a given texture.
I was able to successfully iterate all materials using the assets database. However when it comes to the question of “is this material using this texture” I’ve come across a problem since the answer to that depends on the shader, and each shader has a different set of string properties.
My question is, is there a way to get all the properties of a given shader so that I can iterate each one and check its value?
Edit: Alternatively, is there a place somewhere where I can find all the properties used by Unity’s shaders? or the code of all those shaders so that I can extract a definitive list of all used property names?