using UI.PanelStack; using UnityEngine; namespace UI.PanelStack { public class UIActionMapRouter : MonoBehaviour { [SerializeField] private bool debugLogs = true; public void OnUICancel() { if (UIPanelStack.Instance == null) { return; } bool closed = UIPanelStack.Instance.CloseTop(); if (debugLogs) Debug.Log($"[UIActionMapRouter] UI/Cancel triggered. closedTop={closed}"); } public void OnUIPause() { if (UIPanelStack.Instance == null) { return; } if (UIPanelStack.Instance.IsAnyOpen()) { return; } bool opened = UIPanelStack.Instance.TryOpenOnEscapeWhenEmpty(); if (debugLogs) Debug.Log($"[UIActionMapRouter] UI/Pause triggered. openedMenu={opened}"); } } }