导包 using UnityEditor; 关键代码 // 创建材质 Material mat = new Material(Shader.Find("Transparent/Diffuse")); // 加载本地图片创建纹理 Texture2D texture