|
|
@@ -1,6 +1,8 @@
|
|
|
using UnityEngine;
|
|
|
using System.IO;
|
|
|
using System.Text;
|
|
|
+using System;
|
|
|
+
|
|
|
namespace WildAttack
|
|
|
{
|
|
|
/// <summary>
|
|
|
@@ -10,15 +12,18 @@ namespace WildAttack
|
|
|
{
|
|
|
public static string GetStreamingAssetPath() {
|
|
|
string path =
|
|
|
- #if UNITY_ANDROID && !UNITY_EDITOR
|
|
|
+#if UNITY_ANDROID && !UNITY_EDITOR
|
|
|
Application.streamingAssetsPath;
|
|
|
- #elif UNITY_IPHONE && !UNITY_EDITOR
|
|
|
+#elif UNITY_IPHONE && !UNITY_EDITOR
|
|
|
"file://" + Application.streamingAssetsPath;
|
|
|
- #elif UNITY_STANDLONE_WIN || UNITY_EDITOR
|
|
|
+#elif UNITY_STANDALONE_WIN || UNITY_EDITOR
|
|
|
"file://" + Application.streamingAssetsPath;
|
|
|
- #else
|
|
|
+#else
|
|
|
string.Empty;
|
|
|
- #endif
|
|
|
+#endif
|
|
|
+ // 对路径进行 URL 编码
|
|
|
+ path = Uri.EscapeUriString(path);
|
|
|
+ //Debug.Log("读取文件路径:"+ path);
|
|
|
return path;
|
|
|
}
|
|
|
|