using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; public class UpgradeBackgroundInteraction : MonoBehaviour, IPointerClickHandler { [SerializeField] private GameObject _upgradeUI; public void OnPointerClick(PointerEventData eventData) { if (_upgradeUI != null) { Destroy(_upgradeUI); } } }