Unityから外部アプリケーションを起動する方法を調べてたのでメモ。
//外部プログラムに渡す起動パラメータ string args = "c:\\hoge\\hoge.jpg"; exProcess = new Process(); //mspaint.exeを外部プログラムに指定 exProcess.StartInfo.FileName = "C:\\Windows\\system32\\mspaint.exe"; //起動パラメータを設定 exProcess.StartInfo.Arguments = args; //外部プログラム終了時にイベントを発生 exProcess.EnableRaisingEvents = true; //外部プログラム終了イベントのハンドラ exProcess.Exited += OnExitExProc; //外部プログラム開始 exProcess.Start();
外部プログラム起動中はUnityのフレームは停止するようだ。
まぁ、並列で動かしたいというのでなければ問題ない。
Related Posts
カテゴリー: Unity5