I am doing it within EditorScenePostImport tool script. However the script still has to copy the values of material properties to corresponding uniforms in a premade shader material, one by one, as it cannot get to the imported material’s shader source code.
It’s not as elegant and bugproof as it could be if the actual material shader code was possible to get.