Hi, I am trying to implement inventory system in my project. Before this section everything worked. I was able to drag&drop items in the inventory. Currently I can drag an item but I can’t drop it. If I drop it it goes to the origin place. No error in console.
I tried use some logs. So and I see that in DragItem.cs A can’t get the source in this line:
source = sourceGameObject.GetComponent<IDragSource>();
Debug.Log("Awake source " + source);
in console log is only: Awake source
Same problem is here (also DragItem.cs):
private IDragDestination<T> GetContainer(PointerEventData eventData)
{
if (eventData.pointerEnter)
{
var container = eventData.pointerEnter.GetComponentInParent<IDragDestination<T>>();
return container;
}
return null;
}
Debug.Log for container is nothing.
So I think problem would be somewhere here. But I don’t know how to get game object sourceInventorySlot(Clone) (based on our project)
Do you have an idea where could be a problem?