Skip to content

Instantly share code, notes, and snippets.

@ThaDewey
Created September 16, 2024 00:47
Show Gist options
  • Save ThaDewey/46a8109f85ff1f0ee0088958048d809f to your computer and use it in GitHub Desktop.
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.
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