public void Stop()
{
if(is_stopped)
return;
//is_stopped = true;
success = true;
try{
//Work-around because Unity is being stupid
if (Application.platform == RuntimePlatform.WindowsPlayer || Application.platform == RuntimePlatform.WindowsEditor) {
java_process.GetType().GetMethod( "Kill" ).Invoke( java_process, new object[]{} );
} else {
//Send a "friendly" SIGTERM to java so that we can log some stuff before the program exits
Process killer = Shell.shell_no_start("kill", "-15 "+java_process.Id);
killer.Start();
killer.WaitForExit();
killer.Close();
}
}catch(Exception e){
UnityEngine.Debug.Log(e);
}
}