Maitus
0
Q:

exit game unity

using UnityEngine;
using System.Collections;// Quits the player when the user hits escapepublic class ExampleClass : MonoBehaviour
{
    void Update()
    {
        if (Input.GetKey("escape"))
        {
            Application.Quit();
        }
    }
}
12
//Quit/Stop Game
Application.Quit();
5
//C#
 public static class AppHelper
 {
     #if UNITY_WEBPLAYER
     public static string webplayerQuitURL = "http://google.com";
     #endif
     public static void Quit()
     {
         #if UNITY_EDITOR
         UnityEditor.EditorApplication.isPlaying = false;
         #elif UNITY_WEBPLAYER
         Application.OpenURL(webplayerQuitURL);
         #else
         Application.Quit();
         #endif
     }
 }
0

New to Communities?

Join the community