using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.EventSystems; public class DeselectedAction : MonoBehaviour, IDeselectHandler { public void OnDeselect(BaseEventData eventData) { Debug.Log("Called to deselect"); Destroy(gameObject); } }