duck

duck

May 18th, 2010
217
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.47 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. using System.Collections.Generic;
  4. using UnityEditor;
  5.  
  6. public class MyModelPostprocessor : AssetPostprocessor
  7. {
  8.     void OnPostprocessTexture(Texture2D obj)
  9.     {
  10.         string path = AssetDatabase.GetAssetPath(obj);
  11.         TextureImporter textureImporter = (TextureImporter)AssetImporter.GetAtPath(path);
  12.         textureImporter.maxTextureSize = 512;
  13.         Debug.Log("Applied custom texture settings to: " + path);
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment