Roses/Assets/Scripts/View/UI/CloseButton.cs
2024-04-15 17:53:15 +02:00

20 lines
No EOL
355 B
C#

using UnityEngine;
using UnityEngine.UI;
namespace View.UI {
public class CloseButton : MonoBehaviour {
private Button _button;
private void Start() {
_button = GetComponent<Button>();
_button.onClick.AddListener(CloseClicked);
}
private void CloseClicked() {
#if UNITY_EDITOR
Debug.Log("Quit");
#endif
Application.Quit();
}
}
}