Create a gist now

Instantly share code, notes, and snippets.

dialog
void Update()
{
if (Application.platform == RuntimePlatform.Android)
{
// エスケープキー取得
if (Input.GetKeyDown(KeyCode.Escape))
{
//ダイアログ開く
dialogOpen();
}
}
}
void dialogOpen()
{
      //ラベルをセット
      DialogManager.Instance.SetLabel("Yes", "No", "Close");
// YES NO ダイアログ
DialogManager.Instance.ShowSelectDialog(
"アプリを終了しますか?",
(bool result) => {
Debug.Log("result:" + result.ToString());
              //Yesを押したら終了
              if(result)
Application.Quit();
}
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment