why u want to use LoadAsserAtPath anyway?? it is useless in standalone or web build so jus declare a var as material and link the material to the script in editor… it will work?!
that will work indeed but then i have to assign the material everytime i attach the script to a object. It was much easier if i could just add the script to a object and change the material automatic.
If you have same objects meaning like you attach the material to the object and you need several of them. Just create a prefab out of that object and place the prefab in your scene instead. Or you could just duplicate the object that already attached your scripts to.