|
@@ -35,8 +35,7 @@ namespace GFGGame
|
|
{
|
|
{
|
|
|
|
|
|
|
|
|
|
- string path = Application.persistentDataPath + "/Picture";
|
|
|
|
- Debug.Log("文件路径path:" + path);
|
|
|
|
|
|
+ string path = Application.persistentDataPath + "/Picture/";
|
|
|
|
|
|
|
|
|
|
#if UNITY_ANDROID
|
|
#if UNITY_ANDROID
|
|
@@ -63,10 +62,10 @@ namespace GFGGame
|
|
string fileName = DateUtils.Instance.GetCurTime() + ".png";
|
|
string fileName = DateUtils.Instance.GetCurTime() + ".png";
|
|
|
|
|
|
|
|
|
|
- Debug.Log("文件路径:" + path);
|
|
|
|
Texture2D tex = this.viewData as Texture2D;
|
|
Texture2D tex = this.viewData as Texture2D;
|
|
byte[] bytes = tex.EncodeToPNG();//将纹理数据,转化成一个png图片
|
|
byte[] bytes = tex.EncodeToPNG();//将纹理数据,转化成一个png图片
|
|
var filePath = path + fileName;
|
|
var filePath = path + fileName;
|
|
|
|
+ Debug.Log("文件路径:" + filePath);
|
|
File.WriteAllBytes(filePath, bytes);
|
|
File.WriteAllBytes(filePath, bytes);
|
|
//GetSaveState(path);
|
|
//GetSaveState(path);
|
|
savePngAndUpdate(filePath);
|
|
savePngAndUpdate(filePath);
|