28 lines
535 B
C#
28 lines
535 B
C#
using UnityEditor;
|
|
using UnityEngine;
|
|
|
|
public class TestingQuestionDialog : MonoBehaviour
|
|
{
|
|
// Update is called once per frame
|
|
void Update()
|
|
{
|
|
if (Input.GetKeyDown(KeyCode.Escape))
|
|
{
|
|
YesNoDialogUI.Instance.ShowQuestion("To be or not to be ?",
|
|
() =>
|
|
{
|
|
Application.Quit();
|
|
EditorApplication.ExitPlaymode();
|
|
},
|
|
() =>
|
|
{
|
|
//do nothing
|
|
});
|
|
}
|
|
|
|
|
|
}
|
|
|
|
|
|
}
|