Created
November 30, 2021 10:05
-
-
Save LaserKaspar/e7490caf90b7a5e0ade75d866d61b566 to your computer and use it in GitHub Desktop.
(UnityEngine) Quit a running game.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void QuitGame() | |
{ | |
#if UNITY_EDITOR | |
UnityEditor.EditorApplication.isPlaying = false; | |
#else | |
Application.Quit(); | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment