Hooking into Unity FBX Export from Maya

I saw that Unity uses a MEL script when exporting from Maya. I’d like to make maya write out some extra data for me to use when it reads in the Maya scene. What I want to know is, what is the best practice way to hook my own procedure calls into this script?

Thanks,
Grant

Well, if you know how to script in MEL ( i don’t :wink: ) you can change the export script the way you like but you should create a backup in case you mess something up. Just go to your Unity installation folder: /Editor/Data/Tools/ there you will find the exportscripts that are used by Unity. In your case (Maya) there are 3 scripts (at least on my installation Unity 3.0): FBXMayaMain.mel
FBXMayaExport.mel
FBXMayaExport5.mel

There are also two more scripts, one for 3ds Max and one for blender. Just in case someone else wants to change the export script.