FiE-Game/Assets/Photon Unity Networking/UtilityScripts/QuitOnEscapeOrBack.cs

15 lines
315 B
C#
Raw Normal View History

2023-07-19 19:11:02 +02:00
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();
}
}
}