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