I have a bunch of student games I want to run on an arcade machine we made at college. I would rather not import all the projects into one. I would rather build a menu application in Unity and allow the player to select a game to play. Then it would launch the external game and shut down or minimise the menu app. Once the game was done it would either maximise the menu or run it again. Is this possible to do with Unity? I would assume it’s probably just a command line thing running in a CMD shell???
For Windows machines, this should work when used appropiate:
using System.Diagnostics;
// Prepare the process to run
ProcessStartInfo start = new ProcessStartInfo();
// Enter in the command line arguments, everything you would enter after the executable name itself
start.Arguments = arguments;
// Enter the executable to run, including the complete path
start.FileName = ExeName;
// Run the external process & wait for it to finish
using (Process proc = Process.Start(start))
{
proc.WaitForExit();
// Retrieve the app's exit code
exitCode = proc.ExitCode;
}