Lag in my game on android device

Hello! I have a freeze of my game for 0,2 sec for three times in a scene on my mobile device,
BUT, when i restart the same scene for two times, on the third try a dont have any lags at all.
When i start a new scene, these little freeze happens again, until i restart the scene for two times. I deleted most of code and objects and it didn’t change anything. Help please.

A few things to check.

Particles can cause stutters and lag on mobile when first created. A work-around for this is to have particle objects already be part of your scene so they are already loaded.

Make sure any sound effects you use are preloaded in memory using the preload sound action.

Are text objects or UI updates happening every frame? If so, try and work out when you need these objects to be updated and only do it then (using a timer to update UI components every X milliseconds can also help)

This is a few things I’ve found in the past to help performance on mobile, but if that’s not the source of your troubles, you may need to supply some event examples of video of the lag happening.

Good Luck!

1 Like

Hello, I need help to di it. How to “preload” particels ? Thanks, J

Preload is probably the wrong word to use for the particles, but you want them in memory at the beginning of the scene. I usually place any particles off camera In the scene editor and delete them straight away