MaterialReplacer

Author: Xadhoom

Description
Adds a new editor window at menu Custom→Replace Materials. The editor window allows easy replacement of all materials currently used by a prefab or scene object in one window. The editor window expects the object to be dropped (or selected) in the appropriate object field. After that a list of all materials is shown indicating the current material and its replacement. The material replacements can be dropped or set onto the appropriate object fields. The "save"/"load" button manages external transition files which can be saved or loaded here. Finally the Apply button changes the materials in the prefab or object instance accordingly.

Background information can be found here: http://trianglestrip.blogspot.de/2012/07/material-replacer.html

Usage
You must place the script in a folder named Editor in your project's Assets folder for it to work properly.

Click on Custom→MaterialReplacer

Drop a prefab (not a model file) onto the given object field or select one in the object field.

A list shows up with all materials used by the prefab or scene object. Drop or select materials as replacements in the object fields on the right side for particular materials.

To save the transitions defined press the Save button in the window.

To load transitions from a file press the Load button in the window.

To eventually apply the material replacements to the prefab or scene object press the Apply button.