hello,
I have some question I would like to close the unity app via Application.Quit(special id) and catch it or check the exit code in another app it is possible?
best
hello,
I have some question I would like to close the unity app via Application.Quit(special id) and catch it or check the exit code in another app it is possible?
best
This is dependent on the OS (and possibly shell) you are using, but generally it’s the same on a given OS for ALL programs running under it. Look at the docs for however you are spawning the Unity process as a child, and see how to get exit codes back when that process terminates.
I would like to use it on desktop app Win and Mac
That’s the first place to start looking then. As I said above, 100% of the answer depends on how the other program spawns your process. You need to understand that first.
[ workspace launchApplicationAtURL:url options:0 configuration:[NSDictionary dictionaryWithObject:arguments forKey:NSWorkspaceLaunchConfigurationArguments] error:&error];
I use it for mac but I think I can’t handle error code from this maybe I should use NSTask to run unity app
I don’t know the details of all the NS-prefixed library crud, but basic C interprocess stuff can get you return codes, stuff that is contained in stdio like popen() and exec() and whatnot. Look at the latest docs to see what is safe to use these days because anytime you spawn an external process you probably want to understand the security issues of it.