TexturesPostprocessor.cs 408 B

123456789101112131415
  1. using System;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEditor;
  5. using UnityEngine;
  6. public class TexturesPostprocessor : AssetPostprocessor
  7. {
  8. private void OnPreprocessTexture()
  9. {
  10. TextureImporter importer = (TextureImporter)assetImporter;
  11. importer.textureCompression = TextureImporterCompression.Compressed;
  12. importer.maxTextureSize = 1024;
  13. }
  14. }