Time responding different when playing on Android Device (the APK, not Anroid Remote)

Strange behaviour I’m encountering at the moment with some counters counting down faster than they should when playing on my Android Device from an APK file.

I have a “slow down time” ability in my endless runner. You can only use this for “foo” duration. To update the players current “foo” amount, I do the current “foo” -= Time.unscaledDeltaTime; This works fine in unity. I used unscaled because I want foo to reduce per second, rather than every 2 seconds (since slow down time sets time.timescale to 0.5f.

When I try this on my installed APK on an android device (other devices have the behaviour too), instead of “foo” being reduced by 1 per second, it seems to be about double that. The game however runs at the same speed (from some testing running unity and phone at same time, the player move through the world at same speed). What’s even more odd, is when I jump during slowdown, it makes the “foo” reduce even faster! All my jump is doing is adding velocity to the rigidbody attached to the player until a separate timer (that counts down how long you can jump for) reaches 0. That timer uses deltaTime, as I want the jump duration to be affected by the slow down (otherwise you’d be able to jump less high during slow down mode).

I tried replacing unscaled delta time by Time.UnscaledTime instead, and manually calculating each update cycle the difference between last frames unscaledTime and this frames unscaledTime, but it resulted in the same behaviour when exported to APK and run on an Android device.

Has anyone encountered something and have some advice? This is my first game and I really want to try and get it closer to release but this is causing big playability issues right now for me. Thanks kindly in advance for anyone who reads and contributes.

Solved myself! it was actually not an android bug. The problem was that I had assigned mouse1 (right click) in my input controls so that on PC i could focus while holding right click. What I wasn’t aware of, was mouse1 is triggered by multi-touch on mobile. So essentially in my code when I pressed the focus button - it was running code in the focus button and the code that listened for the “mouse1” input. That caused a few other bugs too for me. But lesson is, mouse1 (right click) will have an effect on mobile controls if they ever use more than one touch on the screen. Hope this helps someone else sometime x