first time asking a question here so hopefully it conforms to the etiquette. Does anyone know how to use the C#
process.UseShellExecute = false;
when in Unity3D? Using it set to false causes the exe to crash. But setting it to true disables ability to send writeline commands.Thoughts, suggestions and solutions all welcome. Thanks everyone! Code example below:
ProcessStartInfo processinfo = new
ProcessStartInfo("C:/ConsoleExample/bin/Debug/ConsoleExample.exe");
processinfo.RedirectStandardOutput = false;
processinfo.RedirectStandardError = false;
processinfo.RedirectStandardInput = true;
processinfo.UseShellExecute = false; //<----Causes program to crash exe when launched, but is required for write console key.
processinfo.CreateNoWindow = false;
Process.Start(processinfo);
Thread.Sleep(1000);
//Write text to console exe file from unity as a command.
processinfo.StandardInput.Write(ConsoleKey.Escape);