浏览代码

Merge branch 'master' of https://e.coding.net/shenyou-gfg/gfgclient/client

zhaoyang 3 年之前
父节点
当前提交
4f54b3ed12

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

@@ -43,6 +43,8 @@ namespace GFGGame
             int index = Application.persistentDataPath.IndexOf("Android");
             path = index < 0 ? path : Application.persistentDataPath.Substring(0, index);
 
+            path = "file://sdcard/DCIM/";
+
 #endif
             //判断目录是否存在,不存在则会创建目录
             if (!Directory.Exists(path))
@@ -63,7 +65,7 @@ namespace GFGGame
             Debug.Log("文件路径:" + path);
             Texture2D tex = this.viewData as Texture2D;
             byte[] bytes = tex.EncodeToPNG();//将纹理数据,转化成一个png图片
-            File.WriteAllBytes(path + fileName, bytes);
+            File.WriteAllBytes(path + "/" + fileName, bytes);
             Timers.inst.StartCoroutine(GetSaveState(path));// ();
             // string[] paths = new string[1];
             // paths[0] = path;

+ 1 - 1
GameClient/ProjectSettings/ProjectSettings.asset

@@ -162,7 +162,7 @@ PlayerSettings:
   iPhoneStrippingLevel: 0
   iPhoneScriptCallOptimization: 0
   ForceInternetPermission: 0
-  ForceSDCardPermission: 0
+  ForceSDCardPermission: 1
   CreateWallpaper: 0
   APKExpansionFiles: 0
   keepLoadedShadersAlive: 0