|
@@ -59,11 +59,11 @@ namespace GFGGame
|
|
|
|
|
|
}
|
|
|
}
|
|
|
- string fileName = DateUtils.Instance.GetCurTime() + ".png";
|
|
|
+ string fileName = DateUtils.Instance.GetCurTime() + ".jpg";
|
|
|
|
|
|
|
|
|
Texture2D tex = this.viewData as Texture2D;
|
|
|
- byte[] bytes = tex.EncodeToPNG();//将纹理数据,转化成一个png图片
|
|
|
+ byte[] bytes = tex.EncodeToJPG();//将纹理数据,转化成一个png图片
|
|
|
var filePath = path + fileName;
|
|
|
Debug.Log("文件路径:" + filePath);
|
|
|
File.WriteAllBytes(filePath, bytes);
|