I have had problems with the OnDrop method, it is that it is not called, I was reading and maybe it has something to do with a Raycaster component, but I'm not sure, I don't even have knowledge of it, if someone could explain this to me I would greatly appreciate it.
Here is my code in c # plus an image of my hierarchy in Unity2D:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class Drop : MonoBehaviour, IDropHandler
{
public void OnDrop(PointerEventData eventData)
{
if (eventData.pointerDrag != null)
{
Debug.Log("Aqui esta");
}
}
}
From already thank you very much.
