Add this function in a subclass to get a notification when a Material asset has completed importing.
使用此方法修改导入期间新创建的材质资源的属性。
using UnityEngine; using UnityEditor;
public class MakeMaterialsRed : AssetPostprocessor { void OnPostprocessMaterial(Material material) { material.color = Color.red; } }