瀏覽代碼

拍照路径

zhaoyang 3 年之前
父節點
當前提交
28e77eedbb
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      GameClient/Assets/Game/HotUpdate/Views/DressUp/PhotographSaveView.cs

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

@@ -35,9 +35,11 @@ namespace GFGGame
 
 
             string path = Application.persistentDataPath;
+            Debug.Log("文件路径path:" + path);
+
 
 #if UNITY_ANDROID
-            path = Application.persistentDataPath.IndexOf("Android") > 0 ? path.Substring(0, Application.persistentDataPath.IndexOf("Android")) : path + "/Pictures/万世镜";
+            path = Application.persistentDataPath.IndexOf("Android") > 0 ? path.Substring(0, Application.persistentDataPath.IndexOf("Android")) : path + "/Pictures/万世镜/";
 #endif
             //判断目录是否存在,不存在则会创建目录
             if (!Directory.Exists(path))
@@ -45,7 +47,7 @@ namespace GFGGame
                 Directory.CreateDirectory(path);
             }
             string fileName = DateUtils.Instance.GetCurTime() + ".png";
-            path = path + "/" + fileName;
+            path = path + fileName;
 
             Debug.Log("文件路径:" + path);
             Texture2D tex = this.viewData as Texture2D;