Last active
March 5, 2020 10:36
-
-
Save glebov21/88d0a19088741e4723c6d5e9de540dde to your computer and use it in GitHub Desktop.
unity3d application quit
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 static void ExitApp() { | |
if(Application.isEditor) | |
UnityEditor.EditorApplication.isPlaying = false; | |
else if(Application.isMobilePlatform) | |
System.Diagnostics.Process.GetCurrentProcess().Kill(); | |
else | |
Application.Quit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment