public static void HandleJobStatus(IgorCore.JobReturnStatus Status) { if (Status.bDone) { if (IgorAssert.HasJobFailed()) { IgorDebug.CoreLogError("Job failed!"); } else { IgorDebug.CoreLog("Job's done!"); } } if (!Status.bWasStartedManually && (Status.bFailed || Status.bDone)) { if (Status.bFailed) { Application.Quit(); } else { Application.Quit(); } } }
public static void EditorHandleJobStatus(IgorCore.JobReturnStatus Status) { if (Status.bDone) { if (IgorAssert.HasJobFailed()) { IgorDebug.CoreLogError("Job failed!"); } else { IgorDebug.CoreLog("Job's done!"); } float time = IgorUtils.PlayJobsDoneSound(); System.Threading.Thread t = new System.Threading.Thread(() => WaitToExit(time)); t.Start(); while (t.IsAlive) { } } if (Status.bFailed) { IgorJobConfig.SetIsRunning(false); if (!Status.bWasStartedManually) { EditorApplication.Exit(-1); } } if (!Status.bWasStartedManually && Status.bDone) { EditorApplication.Exit(0); } }