find material path by name

I have a string name “MaterialA” (it’s variable is not a gameObject), How can I find the path from that?

  1. you can have two or more materials with the same name in different folders, so result of searching can be wrong
  2. if you have no references to this material in project, you will not able to use it in build, cause it will not be included in build package
  3. use Resources folder to store assets you need not at the moment but will need later