1 public static void OpenDirectory(string path, bool isFile = false) 2 { 3 if (string.IsNullOrEmpty(path)) return; 4 path = path.Replace("/", "\"); 5 if (isFile) 6 { 7 if (!File.Exists(path)) 8 { 9 Debug.LogError("No File: " + path); 10 return; 11 } 12 path = string.Format("/Select, {0}", path); 13 } 14 else 15 { 16 if (!Directory.Exists(path)) 17 { 18 Debug.LogError("No Directory: " + path); 19 return; 20 } 21 } 22 //可能360不信任 23 System.Diagnostics.Process.Start("explorer.exe", path); 24 }
unity 如何打开本地文件夹,并选中文件
免责声明:文章转载自《unity 如何打开本地文件夹,并选中文件》仅用于学习参考。如对内容有疑问,请及时联系本站处理。
上篇Spring的对象拷贝BeanUtilsWebstorm/IntelliJ Idea 过期破解方法下篇
宿迁高防,2C2G15M,22元/月;香港BGP,2C5G5M,25元/月 雨云优惠码:MjYwNzM=