Phone getting too hot! Profiler shows nothing

Hi, and thanks for taking the time to read.

Firstly let me say that I’ve been reading optimization documentation for a few days now - and I still can’t figure out what the cause of this issue is. I’ve tested on 6 different devices (iOS/Android) - each of which produce this issue.

I’ve found many threads highlighting this issue - but none that were conclusively answered - just vague suggestions that usually only go as far as “check the profiler to see what’s going on, and then fix it.” Although I understand you can only be so specific without seeing the project.

I have a relatively basic 2D game that uses Input.acceleration as an input. I have a dozen or so canvas elements (images, buttons), and a bit of networking using Photon.

The profiler shows absolutely nothing out of the ordinary - but after running the app for ~5 minutes, the phone gets significantly warmer. After 10+ minutes it gets hot, and a bit longer after that I can see that the phone is starting to limit the app’s processes by lowering the frame rate.

Things I’ve tried:

  • Enabling/Disabling VSync
  • Setting target frame rate
  • Texture compression
  • Lowering quality settings to “Fastest”
  • Testing on several different devices
  • Checking memory allocation (it’s around 114mb on iOS)
  • Lowering the increment at which I’m polling the accelerometer
  • Deep profiling from the device and editor

Thanks for the help!

Addyarb

Don’t forget that Unity will be rendering whatever you are doing on the highest resolution the phone has and most phones nowadays have very high resolution screens.

Try this on the Start() function with VSync on:

Screen.SetResolution(1280, 720, true);

You could have to much going on every frame. Check all your scripts and see what is going on in each of the updates. Also if the script doesn’t need the update function just delete as it still does get called every frame regardless. If you are constantly instantiating objects and destroying objects I would suggest you object pool, if you need a script for object pooling please let me know. Another problem could be to many rigidbodies in the scene at once.

Try turning off pixel perfect in the canvas settings(If you don’t already have done this), can’t imagine anything else.

Btw, thanks cakeslice i think you have just solved my problem ^^

you can also reduce fixed time step, if you are running physics. make sure its not running faster than the fps ( unless it really has to )