void Update() { UpdateManager.Update(); if (Input.GetKeyDown(KeyCode.Escape)) { var page = UIEngine.Top; if (page is MainPage) { SDKManager.Exit(); } else { HeadBarFloating.instance.OnBackButton(); } } }