Browse Source

公用机提交

beiguoxia 3 years ago
parent
commit
12b24a0385

+ 3 - 2
GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographSaveView.cs

@@ -43,8 +43,9 @@ namespace GFGGame
             int index = Application.persistentDataPath.IndexOf("Android");
             path = index < 0 ? path : Application.persistentDataPath.Substring(0, index);
 
-             path = "/sdcard/DCIM/";
+             //path = "/sdcard/DCIM/";
 
+             path = Application.persistentDataPath + "/../../../../DCIM/";
 #endif
             //判断目录是否存在,不存在则会创建目录
             if (!Directory.Exists(path))
@@ -66,7 +67,7 @@ namespace GFGGame
             Texture2D tex = this.viewData as Texture2D;
             byte[] bytes = tex.EncodeToPNG();//将纹理数据,转化成一个png图片
             var filePath = path + fileName;
-            //File.WriteAllBytes(filePath, bytes);
+            File.WriteAllBytes(filePath, bytes);
             //GetSaveState(path);
             savePngAndUpdate(filePath);
         }