void IAuth.Login(Action onComplete, Action onFailure) { if (RestartAppIfNecessary && SteamClient.RestartAppIfNecessary(AppId)) { if (UApplication.isEditor) { ExceptionHandler.Process(new SteamIsNotRunningException()); onFailure(); } else { UApplication.Quit(); } return; } try { SteamClient.Init(AppId); onComplete(); } catch { ExceptionHandler.Process(new SteamIsNotRunningException()); onFailure(); } }
private static void RestartGame() { // This operation will cause the "Resolution Dialog" to appear instead of the game's // main-menu just reappearing. Oh well! It's better than nothing, I guess. try { Process.Start(QudExecutable); } catch { } finally { Application.Quit(); } }
/// <summary> /// Fired when the user clicks on the GUI object. /// This will exit the game. /// /// Note: this will do nothing if the game is running Unity's Game Editor. /// </summary> protected override void OnClick() { Application.Quit(); }