My Phone: Nokia Lumia
What ive figured out so far:
The side bar for the phone (the one with back, search, home) is what is causing issues. Whatever side it isnt on, causes lag when that area is touched. All input is halted for a second before finally being registered. Its like the phone isnt quite sure what side the side bar is on, so if I touch where it might be, it spends a second checking before sending the input to my game.
Rotating the phone (and side bar) replicates the issue on the other side and fixes the original.
So Ive got an app that I have in the store for IOS and Android and the controls work perfectly.
I go to make a Windows Phone version and for some reason the left side of the phone has delayed touch.
There is no other colliders that touch this button, litteraly no other game object sits over it or under it.
The right arrow button works perfectly, but the left arrow delays for about a second and then starts working.
Ive tried moving the button and as long as its not on the left side of the screen, it works perfectly.
So if there something im doing thats causing the Left side of my Windows Phone to delay its touch detection?
My code is irrelevant since it works on 2 other platforms, and if i move the button, it works, so that isnt the issue, neither is something being on top of it as there isnt, ive also disabled as much as I can to see if anything was interfering with it yet still the same result with the left side being delayed.
Everything works fine except the far left arrow button, which works but only on a delay of about 1 second.
If I touch the button (the left arrow) on its right hand side, it works perfectly, but the left side is where the delay happens.
Ok, from the looks of it, the delay is caused by the side bar (the one with the home/back/search button).
I rotated the device which moved the bar and found that the button worked, but the other side of the phone had the issue now. So it looks like my phone spends a second or so checking to see if the side bar before letting my games button be pushed…
Confirmed that on the side that doesnt have the side bar, there is a delay for the touch. No idea how to fix this. Logs show that the touch isnt registered until after the delay, so Unity doesnt see the touch until after the phone has figured out whether the side bar is there or not…
Animations keep going, so the game itself doesnt lag, its just the input. Ill hold down the left move button, lag will start, i then press the jump button and the character doesnt jump until the lag stops.
So, on whatever side the side bar isnt, i experience a delayed reation for input in the place where the side bar would be if it was on the other side…
Here is my unity project as well as a windows build (Visual Studio). Install the VSBuild onto your Windows Phone and if your phone works like mine, youll notice lag when you touch the button that is on the opposite side as the side bar.
Right, it looks like an issue with Windows Phone 8.1 input stack - Unity receives touch down events late as well if they are within ~50 pixels from the top of the screen. The only workaround I can give you today is to avoid having touch buttons there. Though, I’ll look into whether it is something we can solve internally.
sorry for not getting back to you. I’m afraid this was conscious Windows Phone design decision - that area of the phone is reserved for the action center input. When you touch the top of the phone, it thinks you might be seeking to activate action center. There is no workaround for this. The only thing I can recommend is not to put any buttons in the top 50-80 pixels of the screen.
Normal buttons are fine (that you tap, for example). Input isn’t late if you release the finger. This issue comes up only when you hold the finger down on the button.