以下の内容はhttps://hacchi-man.hatenablog.com/entry/2020/09/29/220000より取得しました。


【Unity】Reveal In Finder / Show in Explorer をスクリプトから呼び出す

アセットを右クリックした際に Reveal In Finder / Show in Explorer を選べば ファイラーが開きます

f:id:hacchi_man:20200924000130p:plain:w200

これをスクリプトから呼び出したい場合は EditorUtility.RevealInFinder を利用する

ファイルを指定した場合は ファイルを選択した状態でファイラーを開けますが
ディレクトリを指定した場合は親ディレクトリが選択した状態でファイラーが開いてしまいます

// ルートからのパス と Assets からのパス 両方指定できる
EditorUtility.RevealInFinder(Application.temporaryCachePath);
EditorUtility.RevealInFinder("Assets/");
 
// Assets の親ディレクトリを選択した状態で開く
EditorUtility.RevealInFinder("Assets/");
 
// Sample.unity ファイルが選択状態で開く
EditorUtility.RevealInFinder("Assets/Sample.unity");



以上の内容はhttps://hacchi-man.hatenablog.com/entry/2020/09/29/220000より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14