2016-10-17 1 views
0

"本当ですか?"ユーザーがウィンドウの閉じるボタンをクリックしたときのシステム。 UnityでFormClosingイベントを捕捉することは可能ですか?
ありがとうございます。ユニティのスタンダードクローズボタンを無効にする

編集:

void OnApplicationQuit() 
{ 
    DialogResult result = MessageBox.Show(
     "Are you sure you want to cancel ?", 
     "Question", 
     MessageBoxButtons.YesNo, 
     MessageBoxIcon.Question); 
    if (result == DialogResult.Yes) 
    { 
     Application.Quit(); 
    } 
} 

ユーザーが(X)ボタンをクリックしたときに、私は、ダイアログを開くには、これを試してみました。それは動作しますが、フレームごとに新しいダイアログを作成するようです。

答えて

関連する問題