Commit 1fa2bca6 authored by shujianhe's avatar shujianhe

mac无法创建目录问题

parent ecb7df4c
...@@ -75,6 +75,19 @@ public class utilsTools ...@@ -75,6 +75,19 @@ public class utilsTools
return isPhone == 1; return isPhone == 1;
} }
} }
public static bool IsWin
{
get
{
switch (Application.platform)
{
case RuntimePlatform.WindowsEditor:
case RuntimePlatform.WindowsPlayer:
return true;
default: return false;
}
}
}
public static Vector2 DisplaySize public static Vector2 DisplaySize
{ {
get get
...@@ -541,9 +554,17 @@ public class utilsTools ...@@ -541,9 +554,17 @@ public class utilsTools
public static void CreateDirectory(string path) public static void CreateDirectory(string path)
{ {
string path1 = getWritableByPath(path); string path1 = getWritableByPath(path);
if(Directory.Exists(path1.Replace("/","\\")) == false) if (IsWin)
{
path1 = path1.Replace("/", "\\");
}
else
{
path1 = path1.Replace("\\", "/");
}
if(Directory.Exists(path1) == false)
{ {
Directory.CreateDirectory(path1.Replace("/","\\")); Directory.CreateDirectory(path1);
} }
} }
public static float randValueByFloat(float min,float max) public static float randValueByFloat(float min,float max)
......
...@@ -5,6 +5,21 @@ EditorUserSettings: ...@@ -5,6 +5,21 @@ EditorUserSettings:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 4 serializedVersion: 4
m_ConfigSettings: m_ConfigSettings:
RecentlyUsedSceneGuid-0:
value: 5b04565656070c025e0a547743270744174f4a73292c7f64782b4e62b1b1616a
flags: 0
RecentlyUsedSceneGuid-1:
value: 520650505353510d59560e7046775946454e4d2e7f7d76322c2b4562e7e66760
flags: 0
RecentlyUsedSceneGuid-2:
value: 5350045f5c07085d085b5a2013205a4444154f7a7e7e7f342e281866e1b7676e
flags: 0
RecentlyUsedSceneGuid-3:
value: 5452030553560f580b0f087415270f44444f417a7d2a76322f701e64e7e16d60
flags: 0
RecentlyUsedSceneGuid-4:
value: 0009045f50565e0b0b0d5c7a42270a44134f412e747a74647f7c4c61e1b7626e
flags: 0
vcSharedLogLevel: vcSharedLogLevel:
value: 0d5e400f0650 value: 0d5e400f0650
flags: 0 flags: 0
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment