Files
RatStabber/Assets/MainMenuUI/QuitGame.cs
2024-10-25 16:24:17 -07:00

17 lines
357 B
C#

using UnityEngine;
public class GameQuitter : MonoBehaviour
{
// Method to quit the game
public void QuitGame()
{
// Closes the application
Application.Quit();
// For the editor (testing purposes), stops play mode
#if UNITY_EDITOR
UnityEditor.EditorApplication.isPlaying = false;
#endif
}
}