void Update() { //点击任意空白位置,弹出菜单消失 if (Input.GetMouseButtonDown(0)) { if (null == Menu.CurMenu) { return; } bool b = RectTransformUtility.RectangleContainsScreenPoint(Menu.CurMenu._RectTransform, new Vector2(Input.mousePosition.x, Input.mousePosition.y)); if (!b) { Menu.CurMenu.Hide(); } } //正常运行的情况下这段不起作用 if (Input.GetKeyUp(KeyCode.LeftAlt) /*&& Input.GetKeyUp (KeyCode.F4)*/) { GEditorDataMgr.SaveEditorData(); GEditorDataMgr.CloseSql(); Application.Quit(); Log.i("编辑器正常关闭"); } }
void OnDestroy() { GEditorDataMgr.SaveEditorData(); GEditorDataMgr.CloseSql(); Ins = null; }