return 1 GetPostprocessOrder from the script has to be called first. Return 2/10/any-other-number-bigger-than-1 in GetPostprocessOrder of second script.
public class MaterialProcessor : AssetPostprocessor
{
// This AssetPostProcessor will operate at a very late stage so that the attribs it sets (e.g. _Color) won't get overridden
public override int GetPostprocessOrder()
{
return (100);
}
public void OnPreprocessMaterialDescription(MaterialDescription description, Material material, AnimationClip[] materialAnimation)
{
// Set material shader to Standard
var shader = Shader.Find("Standard");
if (shader == null)
return;
material.shader = shader;
}
}