Low FPS on barebones scene (Android)
I am creating a simple game where the user flicks the screen to create a ball that gets launched at enemies. After creating the base of the game, I noticed that it ran like complete garbage on mobile (Would run at 60 FPS on startup occasionally, then occasionally degenerate into like 19). I am using the lightweight render pipeline. I then disabled many things like multithread rendering etc, and got it to a consistent 43 fps that would STILL drop to about 15 and stay there. I noticed that if I switched apps and then resumed the app process, it would be at 60 fps for about 3 seconds, then instantly drop to 15-20.
So, I decided to create a new project to attempt to create it from scratch to figure out the exact issue. I ported a completely empty scene with only an FPS counter so I could see if there was any lag. The empty scene ran at 60 fps regardless if I switched apps and resumed it.Then, I added a couple of unity Cubes. I baked a directional light, all objects static. Only one LWRP material for the floor cube. Application.targetFrameRate=60 in Awake() of my fps script. No, the FPS script is not causing the lag. It is the basic one that everyone uses that you can find online. Anyway, the FPS alternated between 60 and 30 fps after building this scene, and would occasionally come to around 45. Again, refocusing on the app after switching to another yielded 60 fps for about 3 seconds.
I do not want to lock my app to 30 fps as responsiveness is a main factor of this game.
How the heck do I fix this? Is it even possible to have a 60 fps 3d unity game on mobile?
Tested on a Samsung Galaxy S6. Device should be more than capable. Have seen other unity 3d games that run at 60 fps on mobile.