TextureImporterSetting .cs 563 B

12345678910111213141516171819
  1. using UnityEditor;
  2. namespace GFGEditor
  3. {
  4. public class TextureImporterSetting : AssetPostprocessor
  5. {
  6. void OnPreprocessTexture()
  7. {
  8. TextureImporter textureImporter = assetImporter as TextureImporter;
  9. if (textureImporter != null)
  10. {
  11. if(textureImporter.assetPath.StartsWith("Assets/Res/") || textureImporter.assetPath.StartsWith("Assets/ResIn/"))
  12. {
  13. TextureAutoSet.ChangeTextureSetting(textureImporter);
  14. }
  15. }
  16. }
  17. }
  18. }