using UnityEditor;
public class TransferToSprite : AssetPostprocessor
{
private void OnPreprocessTexture()
{
if (assetImporter.assetPath.Contains(@"Assets/GameMain/UI/UISprites"))
{
TextureImporter textureImporter = assetImporter as TextureImporter;
textureImporter.textureType = TextureImporterType.Sprite;
}
}
}
(011)c# 字符串禁止转义@
于 2021-01-29 11:28:04 首次发布