How to Optimize your Mobile Game In Unity?

How the hell do i optimize my android game that runs in 500+ fps on a mid-range computer but runs 5 fps on a low-mid phone?? My game has 5 post processing effects and 50 lights

1.Vignette
2.Chromatic Abberation
3.Bloom
4.Color Grading
5.Ambient Occlusion

all of these effects run amazing in my computer but in mobile it lags like hell and even without these effects i get around 30 fps in mobile. what is the fix for my game?? how do i set texture size to 512? i think that would help alot. i would love a quick response to my question

i dont want super crazy advanced optimization i just want the game to run better on mobile devices. the graphics aren’t even that good

what could be the solution???

The answer is simple. Get rid of all the lights and post processing. That’s not mobile-land stuff.

At best you can expect to get away with maybe one maaaaybe two real-time lights. Anything else is going to have to be baked or maybe vertex lights. (Not entirely sure on vertex lights tbh. It’s been a really long time since I used them). Post processing is an absolute no-go. Tile-based renderers like what mobile GPU’s use do not play well with that kind of thing.

4 Likes

As said above some of the effects are extremely heavy. I’d suggest to bake the AO (REALLY heavy effect) in the baked lighting. Bloom also is very heavy for mobile since it adds a lot of draw calls. 1 pass effects are fine, but no post-processing is best of course.

There are many optimizations to do of course, but that’s a whole other topic. If removing the effects does not help, run the profiler when running on Android

1 Like

then what could i do to make my game look better? turning off post processing makes my game look bald

Naturally. An average computer is easily at least tenfold faster than any mobile device, especially if there’s a dedicated GPU in the system.

The fact that it runs this kind of graphics at only 30 fps without any postprocessing also seems to indicate that you may have a batch count problem. Seeing that these are cube walls, are we perhaps looking at a large dungeon with many individual cube objects? If so, that will not perform nearly as well as a single static mesh (google: mesh combine).

Unity 6 also has a GPU resident drawer that speeds up rendering of individual meshes, but this may not be available for mobile.

For a quick check at a glance, see the Stats window:
image

Batch count should roughly be in the three-digit range for low end mobiles, preferably in the lower half. But do note that these stats display in-editor stats, these do not actually reflect what’s going on on the device.

The answer really boils down to good art direction and art assets. This is the tried and true method that has been used for decades to get around hardware limitations.

2 Likes

no it’s a single probuilder mesh and i will look into the batch count thing