ApplicationQuit.cs 301 B

1234567891011121314
  1. using UnityEngine;
  2. using System.Collections;
  3. namespace RootMotion.Demos {
  4. // Safely getting out of full screen desktop builds
  5. public class ApplicationQuit : MonoBehaviour {
  6. void Update () {
  7. if (Input.GetKeyDown(KeyCode.Q) || Input.GetKeyDown(KeyCode.Escape)) Application.Quit();
  8. }
  9. }
  10. }