示例#1
0
        public void QuitBtnClick()
        {
            ConfirmWindow cw = (ConfirmWindow)SystemUI.Instance.WindowManager.OpenWindow("ConfirmWindow");

            cw.SetData("Are you sure you want to quit the game?", (ConfirmWindow self, bool result) =>
            {
                if (result)
                {
                    Application.Quit();
#if UNITY_EDITOR
                    EditorApplication.isPlaying = false;
#endif
                }
                else
                {
                    SystemUI.Instance.WindowManager.CloseTopWindow();
                }
            });
        }