Mass assign shaders?

Is there a way to assign a shader to a group of materials?

cheers, ng

Yes there is, via Editor Scripting.

Generally in the Unity Editor, if you want to "mass-do-something" you need an editor script to provide that functionality.


There is an editor script to assign materials to objects, but not - as far as I can see - to assign shaders to materials.

The materials-to-objects script can be found here on the Wiki - along with a whole load of other very useful Editor Scripts which extend the functionality of the Editor. Perhaps one of them could be modified to fit your needs.

(I'm looking further into this because it would be useful for me too right now)