Browse Source

公用机提交

beiguoxia 3 years ago
parent
commit
75e2d5a4c7

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

@@ -35,17 +35,17 @@ namespace GFGGame
         {
         {
 
 
 
 
-            string path = Application.persistentDataPath;
+            string path = Application.persistentDataPath + "/Picture";
             Debug.Log("文件路径path:" + path);
             Debug.Log("文件路径path:" + path);
 
 
 
 
 #if UNITY_ANDROID
 #if UNITY_ANDROID
-            int index = Application.persistentDataPath.IndexOf("Android");
-            path = index < 0 ? path : Application.persistentDataPath.Substring(0, index);
+            //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/Gfg/";
+             //path = Application.persistentDataPath + "/../../../../DCIM/Gfg/";
 #endif
 #endif
             //判断目录是否存在,不存在则会创建目录
             //判断目录是否存在,不存在则会创建目录
             if (!Directory.Exists(path))
             if (!Directory.Exists(path))
@@ -74,11 +74,11 @@ namespace GFGGame
 
 
 
 
         //调用iOS或Android原生方法保存图片后更新相册.
         //调用iOS或Android原生方法保存图片后更新相册.
-        private void savePngAndUpdate(string fileName)
+        private void savePngAndUpdate(string filePath)
         {
         {
             PromptController.Instance.ShowFloatTextPrompt("功能暂未开放,敬请期待!", MessageType.WARNING);
             PromptController.Instance.ShowFloatTextPrompt("功能暂未开放,敬请期待!", MessageType.WARNING);
 #if UNITY_ANDROID
 #if UNITY_ANDROID
-            GetAndroidJavaObject().Call("scanFile", fileName, "保存成功辣٩(๑>◡<๑)۶ "); //这里我们可以设置保存成功弹窗内容
+            GetAndroidJavaObject().Call("scanFile", filePath, "保存成功辣٩(๑>◡<๑)۶ "); //这里我们可以设置保存成功弹窗内容
 #endif
 #endif
         }
         }