Created
September 16, 2024 00:47
-
-
Save ThaDewey/46a8109f85ff1f0ee0088958048d809f to your computer and use it in GitHub Desktop.
Quitting a game in unity...if you want to mimic in the editor....usin the editor statement.
This file contains hidden or 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() { | |
Debug.Log("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