Can someone explain how the IMoveHandler OnMove works? It isn’t receiving any events when cursor is moving on top of a UI element, but perhaps that isn’t what it’s for?
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
public class MoveTest : MonoBehaviour, IMoveHandler
{
public void OnMove(AxisEventData eventData)
{
Debug.Log("Move");
}
}
If that is not what it’s used for, what is the preferred way to detect mouse move events on UI elements (not dragged)?
Pretty sure this is for keyboard/controller input. Confused me, also. Still not entirely sure what it is. Navigation events maybe… shrugs 
What kind of data do you want, exactly?
I want to figure out how one is supposed to get something like the onmousemove found in javascript.
https://www.w3schools.com/jsref/tryit.asp?filename=tryjsref_onmousemove
1 Like
I saw a post on this very topic online somewhere, I think.
They used a coroutine which began running after OnPointerEnter (or OnMouseOver, depending on the content), and then look up the position, using RectTransformUtility localpoint in rectangle… some combination of that.