Material OnAssignMaterialModel(Material material, Renderer renderer) { if (material.name == "" || // 未指定材质 material.name == ("Mat") || material.name.StartsWith("Mat.") || // C4D默认材质 material.name.StartsWith("lambert") || // Maya默认材质 material.name.EndsWith(" - Default") // 3dMax默认材质 ) { Debug.Log("Invalid Material Name: " + material.name); return(EZAssetGenerator.GenerateMaterial()); } return(null); }
private static void GenerateMaterial() { Selection.activeObject = EZAssetGenerator.GenerateMaterial(); }
private static void GenerateTextAsset() { Selection.activeObject = EZAssetGenerator.GenerateTextAsset(); }