UnityEditor > Assign a Physics Material from asset folder to colliders component of objects

hi !

ok here is my little issue , for the game i am doing now , i have quite a bit of box collider to setup. I write a little script using the unity editor API that allow me to import box model from my 3d app and apply at once a box collider component / tag name etc..

But I am stuck for one things, I don't really know how i can assign my physics mat in the same way. The material reside in "GameProject / Physic Material" folder of my project.

I can actually success to create a physic material from scratch while I apply my editor command on my selected object, but it create a physics mat under scene so make things hard to edit later.

what command I should look into inside unity editor API ?

by the way I am using C#

thanks a lot ;)

You can use Resources.LoadAssetAtPath to get hold of an asset in a editor script.