This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
project-undercover/Project Undercover/Assets/Plugins/Photon Unity Networking/UtilityScripts/QuitOnEscapeOrBack.cs

15 lines
315 B
C#
Raw Permalink Normal View History

using UnityEngine;
using System.Collections;
public class QuitOnEscapeOrBack : MonoBehaviour
{
private void Update()
{
// "back" button of phone equals "Escape". quit app if that's pressed
if (Input.GetKeyDown(KeyCode.Escape))
{
Application.Quit();
}
}
}