using NEG.UI.UnityUi.Window; using NEG.UI.Window; using UnityEngine; namespace NEG.UI.UnityUi.Buttons { [RequireComponent(typeof(BaseButton))] public class CloseWindow : ButtonReaction { [SerializeField] private MonoWindow windowToClose; private void OnValidate() { if (windowToClose != null) return; windowToClose = GetComponentInParent(); } protected override void OnClicked() => windowToClose.Close(); } }