您最多选择25个主题
主题必须以中文或者字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
26 行
820 B
26 行
820 B
using UnityEngine;
|
|
using UnityEditor;
|
|
|
|
public class VATTexturePostProcessor : AssetPostprocessor
|
|
{
|
|
void OnPreprocessTexture()
|
|
{
|
|
|
|
if( assetPath.EndsWith("-VATPOS.tga")
|
|
|| assetPath.EndsWith("-VATPOS.exr")
|
|
|| assetPath.EndsWith("-VATNRM.tga")
|
|
|| assetPath.EndsWith("-VATNRM.exr")
|
|
)
|
|
{
|
|
var importer = (TextureImporter)assetImporter;
|
|
|
|
importer.sRGBTexture = false;
|
|
importer.maxTextureSize = 16384;
|
|
importer.textureCompression = TextureImporterCompression.Uncompressed;
|
|
importer.npotScale = TextureImporterNPOTScale.None;
|
|
importer.mipmapEnabled = false;
|
|
importer.wrapMode = TextureWrapMode.Clamp;
|
|
importer.filterMode = FilterMode.Point;
|
|
}
|
|
}
|
|
}
|