gimm270_07_photogallery/Assets/Scripts/ExitCheck.cs

27 lines
428 B
C#
Raw Permalink Normal View History

2022-09-19 00:37:00 -06:00
using UnityEngine;
using UnityEngine.InputSystem;
public class ExitCheck : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
public void OnExit(InputValue value)
{
if (value.isPressed)
{
Debug.Log("Goodbye!");
Application.Quit(0);
}
}
}