public void OnPointerClick(PointerEventData eventData) { ItemView itemView = eventData.pointerCurrentRaycast.gameObject.GetComponent <ItemView>(); if (itemView != null) { shopMouseAction.SelectItem(itemView.GetItemData()); } }