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. 原因有待于经一步确认

浙公网安备 33010602011771号