IF you create a Unity UI Object (text, button, image, doesn’t matter) Then attach the following script:
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
using System.Collections;
public class PointerTest : MonoBehaviour, IPointerDownHandler, IPointerUpHandler {
public void OnPointerDown(PointerEventData eventData)
{
Debug.Log("Pointer Test: Point Down");
}
public void OnPointerUp(PointerEventData eventData)
{
Debug.Log("Pointer Test: Point Up");
}
}
Everything works perfectly. If you Remove IPointerUpHander, and the UpEventFunction. You will still receive Pointer Test: Point Down messages in the console.
However, if you remove the IPointerDownHander (and function) and just leave the Up Interface and function you receive no Log messages. Apparenty if you don’t handle the Down Event you won’t receive OnPointerUp events? This seems strange. I’m wondering if its a logical bug in Unity’s Event System, or intended behaviour