void OnPreprocessTexture() { if (texSettings == null) { texSettings = TexImport.Load(); } TextureImporter importer = assetImporter as TextureImporter; foreach (TexImport i in texSettings) { if (i.ApplyTo(importer)) { break; } } }
public override void OnFooterGUI() { EditorGUILayout.BeginHorizontal(); if (GUILayout.Button("+")) { settings.Add(new TexImport()); } if (GUILayout.Button("Load")) { settings = TexImport.Load(); CustomAssetPostprocessor.texSettings = settings; } if (GUILayout.Button("Save")) { TexImport.Save(settings); } EditorGUILayout.EndHorizontal(); }
public override void OnEnable() { settings = TexImport.Load(); }