Search Unity

Phone getting hot, battery drain?

Discussion in 'iOS and tvOS' started by MrEsquire, Oct 1, 2014.

  1. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Hi all,

    Not sure if anyone has come across this issue before, when playing my game for 20+ minutes the phone becomes warm and heats up on some levels. I noticed also the battery drains by number of percent.
    I know this can happen on really graphic intense games, but the issue is that my game is not this graphic intense. It has multiple levels and not one consistent world or first person shooter game play.

    Does anyone know the best way to debug this issues and see whats causing this?
    Could it be a script that making the CPU work harder on the phone even if not needed?
    Any ideas?

    Thanks for the support.
     
  2. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    What FPS is the game running at? Even if it's half demanding you might have twice the frames.

    So setting a desired framerate would help that.
     
  3. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Game is running at 60 to 63 fps on newer iphone 5 , ipad, older devices iphone 4s at 30 etc ? Is this wrong?
     
  4. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    Do you need to have it run at 60fps?

    I would just do Application.targetframerate = 30 and try that.
     
  5. MrEsquire

    MrEsquire

    Joined:
    Nov 5, 2013
    Posts:
    2,712
    Thanks I removed this line of code completely, game running at around 30fps (No performance loss)

    Is it best to try and debug this issue in Unity3d or try Xcode tools?
     
  6. mbowen89

    mbowen89

    Joined:
    Jan 21, 2013
    Posts:
    639
    I'm not sure what you mean by debugging? I don't think any software can debug overheating if that's what you are saying? I'm guessing you are wanting to see if CPU/GPU usage is lower when capped at 30fps which will inherently increase battery life and decrease heat?

    If so, I'd use the nice tools in Xcode to compare CPU/GPU usage running between 60fps and 30fps...