/* * ------------------------------------------------------------------------ * Description: This class handles the quit button * Author: Eli Simpkins-Simmonds * ------------------------------------------------------------------------ */ using UnityEngine; public class QuitGame : MonoBehaviour { public void QuitGameButton() { Application.Quit(); // If running in the editor #if UNITY_EDITOR UnityEditor.EditorApplication.isPlaying = false; #endif } }