其他分享
首页 > 其他分享> > 使用URL打开文件夹

使用URL打开文件夹

作者:互联网

示例 : 打开资产目录

// 需要加前缀
Application.OpenURL("file:///" + folderPath);

// * 推荐使用Uri类,会将路径进行转换
var folderPath = Application.dataPath;
var uri = new Uri(folderPath);
Application.OpenURL(uri.AbsoluteUri); // file:///E:/Gitee/xxx/Assets

注意点

标签:folderPath,OpenURL,URL,Uri,Application,文件夹,file,var,打开
来源: https://blog.csdn.net/qq_39277419/article/details/116150791