- Код: Выделить всё
using UnityEngine;
using UnityEditor;
using System.Collections;
public class TexturePreprocessor : AssetPostprocessor
{
void OnPreprocessTexture()
{
TextureImporter textureImporter = assetImporter as TextureImporter;
textureImporter.mipmapEnabled = false;
textureImporter.textureFormat = TextureImporterFormat.ARGB16;
if (assetPath.Contains("_32b"))
{
textureImporter.textureFormat = TextureImporterFormat.ARGB32;
}
}
}
вопрос: как подзырить имя импортируемой текстуры?