Nicer QuitGame

This QuitGame will work in the Unity Editor, standalone player or web:

    public void QuitGame()
    {
#if UNITY_EDITOR
        UnityEditor.EditorApplication.isPlaying = false;
#elif UNITY_WEBPLAYER
            Application.OpenURL("https://sharemygame.com/");
#else
            Application.Quit();
#endif
    }
1 Like

Privacy & Terms