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); } } }