void OnPreprocessTexture()
        {
            if (texSettings == null)
            {
                texSettings = TexImport.Load();
            }
            TextureImporter importer = assetImporter as TextureImporter;

            foreach (TexImport i in texSettings)
            {
                if (i.ApplyTo(importer))
                {
                    break;
                }
            }
        }
Esempio n. 2
0
 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();
 }
Esempio n. 3
0
 public override void OnEnable()
 {
     settings = TexImport.Load();
 }