Hi All,
I want to use the event system. It works on the UI, but I also want to use elements that are not part of the UI.
I have spawned a sprite in script and I want to be able to drag it around. It has a sprite renderer and the script below attached to it, but I can’t get it to recognize event. Am I missing something?
public class BoardLetter : MonoBehaviour, IBeginDragHandler, IPointerDownHandler
{
public void OnBeginDrag(PointerEventData eventData)
{
Debug.Log("This works");
}
public void OnPointerDown (PointerEventData eventData)
{
Debug.Log("This works");
}
}