Before using holographic emulation,I can get the UI correctly: get correct UI
But after using holographic emulation, I can't get the UI correctly.
when I move the cursor to another position, the UI get??
I use this way to get UI:
PointerEventData pData = new PointerEventData(EventSystem.current);
pData.position = new Vector2(Screen.width * 0.5f, Screen.height * 0.5f);
pData.delta = Vector2.zero;
pData.scrollDelta = Vector2.zero;
List<RaycastResult> canvasHits = new List<RaycastResult>();
canvasRaycaster.Raycast(pData, canvasHits);
if (canvasHits.Count > 0) //process
who can help me? I guess this is a unity bug.