Unity技術 資源管理器explorer使用

2021-09-25 16:11:29 字數 865 閱讀 9029

在window上可以使用explorer來啟動資源管理器,來檢視相應的內容。在unity中編寫編輯器時,有時候會希望處理完成後開啟對應的檔案所在的位置,以方便給使用者提示生成的檔案位置或者檢視生成結果,本文將介紹一下explorer的命令列引數及如何在c#中使用

對於explorer大家應該是經常用到,如果覺得陌生,可以開啟"任務管理器"找到explorer,然後結束掉此程序,看看會出現什麼情況

資源管理器explorer使用(

命令格式:

explorer [/n][/e][[,/root],[path]][[,/select],[path filename]]

引數說明:

示例:在c#指令碼中可以使用process來呼叫explorer來開啟需要的目錄或者選中需要的檔案。

呼叫explorer在win上開啟目錄

explorerutil.openexplorerfolder(@「c:\windows」)

呼叫explorer在win上開啟目錄並選中希望選中的檔案

explorerutil.openexplorerfile(@「c:\windows\system32\calc.exe」)

注意事項:

對於目錄或者檔案路徑需要特別注意的,只能使用"\「而不能使用」/"

public static class explorerutil

public static void openexplorerfile(string filepath)

}

Unity技術 資源管理器explorer使用

unity技術 資源管理器explorer使用 簡介在window上可以使用explorer來啟動資源管理器,來檢視相應的內容。在unity中編寫編輯器時,有時候會希望處理完成後開啟對應的檔案所在的位置,以方便給使用者提示生成的檔案位置或者檢視生成結果,本文將介紹一下explorer的命令列引數及如...

資源管理器

using system using system.collections.generic using system.linq using system.text using system.threading.tasks namespace day 09 小型資源管理器 檔案長度 public st...

簡單資源管理器

下面共享乙個我自己的資源管理器,很簡單的,看起來也明白,主要是我是新手,不想寫的太複雜,自己專案使用的好用,便是最好的。using unityengine using system.collections using system.collections.generic using system p...