Very bad performance in empty project!

Hi,

I’m using Unity 5.2.2f1. In my sample project there is only camera with FPS Script.
On my android device I’m getting only 30fps!
I am able to get 60fps but only when I force lower the resolution in the app.

Here is the empty project:

https://www.dropbox.com/s/m3r3ytwwokmfme0/AndroidFPSTest.zip?dl=0

Am I doing something wrong? Is it bad to have full native resolution 1280 x 720 in Unity? Or do I have to use lower resolutions like 720x405 to get good performance?

My phone is not the highest end, but I would expect to be able to draw empty scene with 60fps…

Thanks.

The procedural skybox can be quite expensive on lowend devices, especially if you fill the entire screen with it :slight_smile: Normally large parts of the skybox would be covered by a less expensive fragment shader.

Try clearing with a solid color, or add some geometry to not make the heavy skybox fill the screen.

1 Like

With solid color it’s still fluctuating 30-45 fps…

Is there any example Android project, which is set up properly and is expected to have good performance, so that I can check if it produces good performance on my device?

An empty scene that only clears the screen using a solid color should definitely run at 60fps. What device are you using?

1 Like

Hi, it’s this one. http://www.gsmchoice.com/en/catalogue/pentagram/monsterx5/Pentagram-Monster-X5.html
I was hoping to find some example project with everything set up but with no success.

However I’m not sure if this is the problem but:
-after I disconnected usb, killed Unity Remote 4, killed the application in Android and started it again the performance improved. Now I’m getting about 60 fps with only cube added, but it still fluctuates at 40-60 fps for some reason.

Oh my! That device is really slow. At native resolution it’s actually slower than the 5 year old Nexus One.

My recommendation would be to drop the resolution if you are serious about supporting devices like that. Even if you should be able to clear the screen and maintain 60fps I’m not sure you can afford anything else. You could also try running a 16bit display buffer to reduce the needed bandwidth.

1 Like

Hi, thanks for help.
How do you know that it’s slower at native resolution? Are there some stats to check the performance like that?
I’ve bought it ~2 years ago and it was sufficient for me at that time… maybe it’s time to move on :stuck_out_tongue:

He can see the hardware it uses on the page you linked. And that GPU isn’t really good for much when you raise the resolution… a common problem with cheap phones.

And… it’s time to move on :smile: A modern android phone with beefy stats will beat out an xbox 360. Sort of, depending what you’re doing!

1 Like

I have actually seen something similar - an “empty” project (e.g: the default empty scene with a camera + skybox) running at 30 FPS on a Samsung Galaxy Tab 2.

I did not have proper time to keep investigating it, but it seems that an empty scene should be able to run at 60 FPS…

1 Like

The default skybox is kinda expensive for mobile. So that’s not an “empty” scene.

Yeah it’s pixel shader math heavy, which is death on mobile. Just slap a classic skybox on and see it ramp up to 60fps. Just because Unity went PBR it doesn’t mean mobiles became PBR capable.

Good thing is you get to use any shaders you want. I’d recommend the mobile ones.

I actually was able to get 30 fps with as little as a single sprite in the scene and a solid clear flags. Again, i’m talking about a pretty old device (Tab 2) but still this seems like pretty low performance for a single rendered object…

1 Like

Thanks for all answers.
After testing with empty scene I managed to run my game in Genymotion - oddly (or coincidentally- which is better since deployment is faster in it), the performance is quite the same as on my phone (i’m getting 50-60 fps on phone and in genymotion - in editor 130-180fps) ! I’ve changed all shaders to mobile, removed Detonator Framework and I think I’ll use simpler style to have better performance (“blocky” like Crossy Road).