2D rendering lags

I’m developing an horizontal scrolling 2D game. It’s very simple, there are 2 sprites for the background, a pool of 7 simple obstacles and a character. However I’m experiencing heavy lags on android specially when the game starts. Now, I’ve tried to change the clear flag of the camera to “don’t clear” but it show always more black pixel over time! Is there a performance checklist for 2d android development?

hmm… i dont’t know if there is an performance checklist for android but you can turn on the “Profile” in Unity and you can easily check what in your scene is tacking all the performance, also check the stats of your phone and compare it with unity :wink:

I’ve already used the profiler. However I could only found out that the problem is the rendering. I need to have more than 100 active rigidbodies in the scene , could it be a problem for android platform?

Are you using a texture atlas or multiple textures? Mobile devices don’t like to switch textures all the time and could be the cause of your slow down.

Do a lot of searching for mobile optimization in unity. This topic has been covered to death :slight_smile: It’s even got it’s own section in the manual.

1 Like