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