Skip to content

Instantly share code, notes, and snippets.

@glebov21
Last active March 5, 2020 10:36
Show Gist options
  • Save glebov21/88d0a19088741e4723c6d5e9de540dde to your computer and use it in GitHub Desktop.
Save glebov21/88d0a19088741e4723c6d5e9de540dde to your computer and use it in GitHub Desktop.
unity3d application quit
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