Search Issue Tracker
By Design
Votes
1
Found in
4.6.0b20
Issue ID
639403
Regression
No
EventSystem.current.IsPointerOverGameObject() never returns true on Android
EventSystem.current.IsPointerOverGameObject() can't be used on Android because it always returns false there.
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Editor crashes on StoredGraphicsBuffer::GetGfxBufferID when VFX Graph property is modified during Play Mode and Application.targetFrameRate is used to limit FPS
- Crash on NVAPI_Thunk when changing Player resolution while HDR display is used and Direct3D12 is set as the graphics API
- Only one out of multiple cameras is shown in the Play Mode while HDR display is used and Direct3D12 is set as the graphics API
- The "Paste Component as New" option is incorrectly displayed as active despite the action being prohibited
- "TLS Allocator ALLOC_TEMP_TLS" errors are thrown when unsuccessfully importing an FBX file
Saturn1004
Jul 19, 2018 10:19
Touch touch = Input.touches[0];
EventSystem.current.IsPointerOverGameObject(touch.fingerId)
Tested and working fine in 2018.2 for me.
yosun
Apr 22, 2018 01:55
Is this resolved or still going on in 2017.3.1?
grimmy
Mar 30, 2018 13:32
EventSystem.current.IsPointerOverGameObject(touch.fingerId) is always returning false on Android (fine in editor). I'm getting this in 2017.3.1p4 many years after this was reported.
As designed is not an answer. I have no work around for this. 1 day of my time has been wasted finding a solution. Why on earth does UI not block raycasts to 3d gameobject by default anyway. This is terrible design.
Mykhaylo Hnatyuk
Dec 14, 2015 13:38
1) You have to use fingerId
Touch touch = Input.touches[0];
EventSystem.current.IsPointerOverGameObject(touch.fingerId)
2) In my case IsPointerOverGameObject returns TRUE if(touch.phase == TouchPhase.Began),
BUT it returns FALSE if(touch.phase == TouchPhase.Ended || touch.phase == TouchPhase.Canceled)
So you can remember if you started your touch over UI and cancel it at the end.
JaredAtSnowedIn
Nov 25, 2015 14:49
+1 for thinking it's pretty wild that this is marked as by design.
I think this issue was probably overlooked, assuming it was working as intended. It's very obviously a bug if if IsPointerOverGameObject(touch.fingerId) returns false when that fingerId is in fact over an event system game object.
I'd suggest you either remove the pointerid variant or re-open the issue.
TheFranS
Oct 31, 2015 11:41
It stil doesn't work in Unity 5.2.2.p1.
Hiti3
Sep 30, 2015 12:27
So, you add a feature to check if the pointer is over the GUI element and it works fine with Unity Remote, but not with a final handheld device (By Design)? Hey we made a great game, but download Unity and Unity Remote in able to play it normally. "We made it that way by design".
Who are you joking Unity developers?
basssssss
May 19, 2015 09:24
Issue still occurs in Unity 5.0.0f4.
StormyShelter
Feb 14, 2015 16:31
So the new GUI is pretty useless for buttons. "By Design".
Darkcoder
Jan 06, 2015 12:43
Why is this marked as 'By Design'?
The FAQ says this method is how you test to see if the GUI is not being pressed by anything, thus allowing you to interact with the main scene. If this doesn't work then it's pointless, and it does work on desktop so unless the design is for this to be inconsistent then it seems broken.