Advertisement
Guest User

Untitled

a guest
Apr 18th, 2019
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.45 KB | None | 0 0
  1. using UnityEditor;
  2.  
  3. namespace Simian
  4. {
  5. public class ProcessTextures : AssetPostprocessor
  6. {
  7. public void OnPreprocessTexture()
  8. {
  9. TextureImporter importer = assetImporter as TextureImporter;
  10. if (importer == null) return;
  11.  
  12. //omit -S from streaming
  13. if (assetPath.Contains(" -S"))
  14. {
  15. importer.streamingMipmaps = false;
  16. //Debug.Log(assetPath);
  17. }
  18. else
  19. {
  20. importer.streamingMipmaps = true;
  21.  
  22. }
  23. }
  24. }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement