So I have this script here:
using UnityEngine;
using UnityEditor;
public class TextureProcessor : AssetPostprocessor
{
void OnPreprocessTexture()
{
TextureImporter importer = assetImporter as TextureImporter;
importer.anisoLevel = 0;
importer.filterMode = FilterMode.Bilinear;
importer.wrapMode = TextureWrapMode.Clamp;
importer.mipmapEnabled = false;
importer.textureFormat = TextureImporterFormat.PVRTC_RGB4;
importer.npotScale = TextureImporterNPOTScale.None;
importer.textureType = TextureImporterType.Advanced;
importer.maxTextureSize = 2048;
}
}
It changes the default settings on every texture that Unity imports, and it works just fine.
But the thing is it disallows me to manually edit a textures settings. If I go into a texture’s settings, and change something, then click apply, it will do it’s thing, but then this script will override any manual edits I made in the settings.
How do I change that? How can I make it so this script is always enabled, and it will also allow me to make manual changes to textures?