AssetPostprocessor.OnPostprocessMaterial(Material)

Switch to Manual

Description

将此函数添加到一个子类中,以在材质资源完成导入时获取通知。

使用此方法修改导入期间新创建的材质资源的属性。

This method is only called by the ModelImporter.

using UnityEngine;
using UnityEditor;

public class MakeMaterialsRed : AssetPostprocessor { void OnPostprocessMaterial(Material material) { material.color = Color.red; } }