- Home /
Steady FPS on Android. How can I achieve it? Profile analysis.
Greetings,
I am really trying to build my first game on Android and I am still kind of new to Unity. I don't really understand the profiler's data. I want to achieve steady fps (60 is ofc desired) but so far without any luck. It seems to me that no matter what I do, I am always getting this spiking fps. Here are the measures that I have taken so far:
1.Reduce the Resolution of the textures to a minimum.
2.Don't use any lights.
3.Decrease vertex count. Now is about 7k in the scene.
-
I am using the Lightweight Pipeline and the Unlit shader.
5.No postprocessing stuff.
I will be forever grateful if someone can help me with this problem. I have invested so much time by now without any progression.
PS. If you need further info, I will be happy to provide.![alt text][1]
UPDATE: In order to cap the fps I disabled V-Sync (strange I know). But turning on vsync did not cap anything at all on android. (It was giving me an approximation not hard values). After disabling vsync I set Application.targetFrameRate to desired value in update method. [1]: /storage/temp/124432-profilertimeline.png
I presume your game is 3D, try OcclusionCulling to improve performance. I must mention, Developer Build will be slow, production build may give more stable FPS. You can useFrameDebugger to check what object causes that spike.
Hi and thank you for the reply.
I have tried it already. $$anonymous$$y batches are not that much nor are my vertices. It does not make a difference when I used it. The problem is that I cannot really use OcclusionCulling since some of my objects are spawned dynamically and "at random". Therefore, I cannot bake the scene. Is there a way to see in the FrameDebugger which assets is taking the most ms to render?
Answer by JVene · Sep 12, 2018 at 06:25 PM
Try visiting player settings->resolution and presentation, turn off the 32 bit display buffer - see if that impact anything.
Hello and thank you,
I have done that before and left it unchecked. Still not working. Why am I getting more than 60 fps on mobile? Isn't it capped 60?
On iPhone, the operating system will not accept anything but a synchronized output, but on Android you can disable and enable vsync, so while it can be capped at 60, that's only if vsync is enabled.
I assume this is a device, not an emulator. What is the device specs (GPU, Android version, RA$$anonymous$$, CPU & speed). Can you try other devices?
If other devices aren't an option, there's one good alternative to try, called "$$anonymous$$emu". "$$anonymous$$emu" is a free download of an Android virtual machine for Windows (not sure, could be a $$anonymous$$ac version), but it has one clear advantage over all other virtual machines, it supports OpenGL ES 3.0 (the AVD's and all other Android V$$anonymous$$'s I know of are either software graphics or limited to OpenGL ES 2.0). Try $$anonymous$$emu as an alternative to see how different your results might be. Depending on your hardware, the performance can be wildly beyond a phone, but (for example the integrated GPU on Intel) some are similar to a high end phone.
Hey JVene and thank you for the efforts,
I am using Galaxy S4 as my test device. I am trying to make it run smooth on that device (at least acceptable).
Even after I enable Every V Blank the device is not capped as you can see in the pictures at 60 fps. It is really funny because even If I make my scene as tiny as possible and remove all fancy shaders and leave the unlit ones I am still not able to get constant 60 fps.
I am starting to think that it is a version bug but I find it really sad that I must downgrade the version to old ones and miss some of the good stuff in the new versions. I have always tried to make easy the performance (low vertex count, no fancy shaders, I am not even using Light at the moment and other things). But unfortunately I did not good results. It is kind of demotivating at this point.
Your answer
Follow this Question
Related Questions
High GPU Usage Android 0 Answers
weird profiler result? 0 Answers
Low FPS with no shown reason 2 Answers
Why CPU waits for GPU when there is not much work on GPU? 0 Answers