Skip to content

Instantly share code, notes, and snippets.

@davepape
Created November 1, 2021 03:41
Show Gist options
  • Save davepape/5f789d3a7ed0d90dd2d49ce9d66af4a2 to your computer and use it in GitHub Desktop.
Save davepape/5f789d3a7ed0d90dd2d49ce9d66af4a2 to your computer and use it in GitHub Desktop.
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class QuitOnEsc : MonoBehaviour
{
void Start()
{
}
void Update()
{
if (Input.GetKeyDown(KeyCode.Escape))
{
Application.Quit();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment