finish yes/no dialog with test

This commit is contained in:
voffka81
2022-08-17 11:28:10 +03:00
parent c0ea0addcb
commit 34fd8ec609
3 changed files with 38 additions and 9 deletions
+23
View File
@@ -0,0 +1,23 @@
using UnityEditor;
using UnityEngine;
public class TestingQuestionDialog : MonoBehaviour
{
// Update is called once per frame
void Update()
{
if (Input.GetKeyDown(KeyCode.Escape))
{
QuestionDialogUI.Instance.ShowQuestion("To be or not to be ?",
() =>
{
Application.Quit();
EditorApplication.ExitPlaymode();
},
() =>
{
//do nothing
});
}
}
}