Maya script to transfer materials

Okayy, so i have a question here

I am wondering, if there is a script for maya that I can use to retain the material and the connected textures whilst exporting a mesh from Maya to UE?

If yes, could you direct me to it?

If no, can you suggest how can i make a script like that for myself?