将TextureSetting 脚本放在Editor文件夹下
using UnityEditor;
public class TextureSetting : AssetPostprocessor
{
private void OnPreprocessTexture()
{
TextureImporter importer = (TextureImporter)assetImporter;
importer.textureType = TextureImporterType.Sprite;
}
}