void Update() { if (Application.platform == RuntimePlatform.Android) { UIDialog activeDialog = GetActiveDialog().GetComponent <UIDialog>(); if (activeDialog && activeDialog.bResponseBackButton) { if (Input.GetKeyUp(KeyCode.Escape)) { activeDialog.ShowOut(); } } } }