Exemplo n.º 1
0
        void OnPreprocessTexture()
        {
            if (texSettings == null)
            {
                texSettings = TexImport.Load();
            }
            TextureImporter importer = assetImporter as TextureImporter;

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