Unity打开Windows窗口得两个Api

原文地址:https://blog.csdn.net/qq_27927387/article/details/107816940

1、 EditorUtility.OpenFilePanel("窗口名",path,"exe");

该接口打开本地对应路径,打开固定后缀名得文件,并返回该文件得路径。

public String OpenFile() {
string s;
s= EditorUtility.OpenFilePanel("窗口名", Application.streamingAssetsPath, "houzhui");
return s;
}


2、EditorUtility.RevealInFinder();

该接口直接显示对应路径得文件。没有返回值。

public void ShowFile()
{
EditorUtility.RevealInFinder(Application.streamingAssetsPath);
}

————————————————
版权声明:本文为CSDN博主「张嘿嘿」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_27927387/article/details/107816940

posted on 2021-12-24 11:24  ZhYQ_note  阅读(327)  评论(0)    收藏  举报

导航