Unity3D:C# Process Exited事件不回調的問題


	private void exeShell_mac (string shellPath, string arguments, bool waitForExit)
	{
		Debug.LogError ("exeShell_mac");
		System.Diagnostics.Process process = new System.Diagnostics.Process();
		process.StartInfo.FileName = "/bin/sh";
		process.StartInfo.Arguments = shellPath + " " + arguments;

		process.EnableRaisingEvents = true;
		process.Exited += (sender, e) => {
			Debug.LogError ("Exited ");
		};
		process.Start ();
	}
 

 1. process 要用局部變量

   2. process.Exited += new System.EventHandler (exeShellProcess_Exited); 居然不callback

   3. 原因有待於經一步確認


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM