Best way for script to grab custom material data information about object

Hello. I’ve made a script that is supposed to grab the material from an object and then decide from a switch how much density that material has. The problem however is that I can’t grab the texture/sprite the material has, because then I’m forced to specify the name of the texture, and since I will most likely make a few variants of the same texture type this will be a nightmare to code while adding in new textures, so I’ve thought up a few other ways to do it, but I can’t decide on which I should pick:

Adding a script “materialData” to every object in the scene I want the script to interact with
Pro
Straight forward

Con
Gets kinda messy in the inspector

Using/abusing the “physics material” to check for the name of the chosen physics material and then funnel it through a large switch
Pro
Much less messy in editor since its integrated to the collider
A bit less time consuming adding to every object in the scene
I have to use them anyway for a lot of objects

Con
Not really what it was meant to do?
Slow string comparison? (not really sure if you have to do it)
I have to have them on static objects too, which it’s not really made for

Using tags on every object
Pro
Not messy in inspector

Con
Tags loose their performance value when searching due to every object having a tag I believe

Using the built-in auto density thing is not an option for me since its so hard to get the physics right that way since the density depends on the object’s weight. If you know any other solutions to my problem, please tell me
Thanks

I would just go with adding a script that contains information about the object’s density in a form that you need it, and doesn’t clutter up other objects.

ALSO, you can put in checks to throw errors if some object is lacking that script, or else always add a default one at runtime and print a warning to Debug.LogWarning() so you know you have to go fix it. (Print the name of the object too, to save yourself some hunting!)