Auto setting material type on import

So i’ve noticed that in 3.5 the unity team has:

"Implemented better detection of imported material types. Unity uses normal-map and transparency properties (texture or factor) to apply one of the following shaders: “Bumped Diffuse”, “Transparent/Diffuse” or “Transparent/Bumped Diffuse”.

Is there a way to get arround this? I have an editor script currently set up to automatically set most of the other fbx import settings the way i like but I’m having a hard time finding a way to auto set the importing material shader. 90% of the time i need material to import as diffuse, and though i realize I can solve the problem by adjusting the material properties in maya before exporting, it’s more practical for me to control it from unity on import. Any direction would be greatly aprichiated.



Here you go, that’s how I’m doing it:

Material OnAssignMaterialModel ( Material material, Renderer renderer )
    material.shader = Shader.Find( "Diffuse" );

This should do what you want :slight_smile: