Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- using System.Collections.Generic;
- using UnityEditor;
- public class MyModelPostprocessor : AssetPostprocessor
- {
- void OnPostprocessTexture(Texture2D obj)
- {
- string path = AssetDatabase.GetAssetPath(obj);
- TextureImporter textureImporter = (TextureImporter)AssetImporter.GetAtPath(path);
- textureImporter.maxTextureSize = 512;
- Debug.Log("Applied custom texture settings to: " + path);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment