using UnityEngine; using System.Collections; using UnityEngine.SceneManagement; public class QuitGame : MonoBehaviour { void Update() { //ゲームタイトルへ if (Input.GetKeyDown(KeyCode.R) || Input.GetKeyDown(KeyCode.F1) || Input.GetKeyDown(KeyCode.F2))// || Input.GetKeyDown(KeyCode.Joystick1Button8) || Input.GetKeyDown(KeyCode.Joystick2Button8)) { SceneManager.LoadScene(0); } //ゲームを終了する if (Input.GetKeyDown(KeyCode.Escape) || Input.GetKeyDown(KeyCode.F4)) { Application.Quit(); } } }