Search Unity

Android - lack of Inputs Touches slows framerate

Discussion in 'Android' started by ryba166, Feb 25, 2015.

  1. ryba166

    ryba166

    Joined:
    Feb 25, 2015
    Posts:
    2
    Hi,

    Very sorry in advance if someone described my problem, especially if it was solved. I was searching on Android/Unity forums couple of days to find answers to very weird behavior of my game while testing and found nothing.

    So, I've made simple game 2d with some 3d effects. While testing game on my tablet (Samsung Galaxy Tab 3 Lite) on Android 4.2.2 I've noticed fall of framerate from 25-30 to 5-7FPS when not touching screen. Problem appear after deploy application to tablet.

    When I touch the screen framerate jumps to 25-30 fps. So my question is Android somehow slows my aplication when there is no input action (maybe change state to save energy)?

    I tested it on better hardware (Galaxy S4, Lumia 730) and problem not occured (maybe some slow but not visible).

    I think, I tried every combination of graphics changes (with change compression every texture to max 128 for android) and check is something strange happens in script where theres no input action but no result.

    Btw I'm using graphics 2Art by Manufactura.
     
  2. HelloMeow

    HelloMeow

    Joined:
    May 11, 2014
    Posts:
    280
    I'm seeing the same on my Oneplus one. I think it's a power saving feature of the phone or android itself. I wonder if it can be turned off or something.
     
  3. bitter

    bitter

    Unity Technologies

    Joined:
    Jan 11, 2012
    Posts:
    530
    Yes, some Android devices clock down as soon as you take your finger off the screen :-( I'm not 100% sure it helps but try grabbing a wakelock - "Screen.sleepTimeout = SleepTimeout.NeverSleep;"

    If that doesn't help and you have a reasonably common device please file a bug report. I'm not sure if there is anything we can do about this behavior but it would be interesting to try.
     
  4. ryba166

    ryba166

    Joined:
    Feb 25, 2015
    Posts:
    2
    Unfortunately, the solution with "Screen.sleepTimeout = SleepTimeout.NeverSleep;" didn't help. Thanks for reply, If I find solution I'll inform you guys here.
    .
     
  5. FailCake

    FailCake

    Joined:
    Aug 14, 2013
    Posts:
    2
    Having the same problem on Oneplus 3, din't have it on oneplus 1 tough :(
    Using the latest version of unity (5.4.0f3)



    Might have figured out, for some reason it doesn't like UnityEngine.GUI, weird..
     
    Last edited: Sep 18, 2016
  6. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    149
    Sorry for bumping this old topic, but I have same issue. Did any of you found a way to "fix" this?
     
  7. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    149
  8. studentvz

    studentvz

    Joined:
    Dec 14, 2014
    Posts:
    149