- Home /
"Image.raycastTarget = false" not consistent between PC and Android
I am dragging a screen space UI element over a world space UI element and checking that the world space element is hovered. The problem I had initially was the hover check for the world space UI was being blocked by the screen space UI object I was dragging. I fixed this by turning off the dragged image's raycast target when I click and start dragging it.
My new problem is this works perfectly in the editor and desktop builds but does not work on Android. The raycast target is being turned off correctly on the dragged image so I'm not sure why the same effect is not happening between android and PC.
Answer by Capgar · Dec 07, 2020 at 04:30 AM
The issue I had seems to stem from some old code that was still spawning an invisible UI element that was blocking the raycast on android but not on desktop...