Last active
July 17, 2023 10:06
-
-
Save inutamago-dogegg/8f581b2b51034ac7855727676e3368eb to your computer and use it in GitHub Desktop.
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
using UnityEngine; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif | |
private static void QuitGame() { | |
#if (UNITY_EDITOR) | |
EditorApplication.isPlaying = false; | |
#elif (UNITY_STANDALONE) | |
Application.Quit(); | |
#elif (UNITY_WEBGL) | |
Application.OpenURL("about:blank"); | |
#endif | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment