// --------------------------------------------------------------------------------------------------------------------
//
// Part of: Photon Unity Utilities,
//
//
// This component will quit the application when escape key is pressed
//
// developer@exitgames.com
// --------------------------------------------------------------------------------------------------------------------
using UnityEngine;
using System.Collections;
using System.Diagnostics;
namespace Photon.Pun.UtilityScripts
{
///
/// This component will quit the application when escape key is pressed
///
public class OnEscapeQuit : MonoBehaviour
{
[Conditional("UNITY_ANDROID"), Conditional("UNITY_IOS")]
public void Update()
{
// "back" button of phone equals "Escape". quit app if that's pressed
if (Input.GetKeyDown(KeyCode.Escape))
{
Application.Quit();
}
}
}
}