0

I recently faced the problem and I really need your help. The game starts to lag terribly on my android phone when I start using the native UI (e.g. navigation bar, notification panel or changing the volume level).

The game itself does not lag, everything goes perfectly under 30 fps, but when I start using the native UI, the screen starts to crumble (but still under 30 fps, without drawdowns). I recorded a video from another phone, because when I use a screen recorder, this bug disappears (probably the screen recorder optimizes frames somehow).

VIDEO: https://youtu.be/xfHmZuUI8SE

Possible solution with Optimized Frame Pacing? No! Unfortunately, I cannot use this feature due to a critical bug on another phone (the old low-end phone starts to lag terribly and slow down after a couple of minutes of gameplay). Unity still can't fix it and I'm preparing a huge detailed bug report on this topic.

I have also tried setting different Application.targetFrameRate values, but the problem still persists.

I will be very grateful if you help me or tell in which direction to do my research.

4
  • Are you updating the ui every frame? Can you reduce it? Commented Mar 24, 2023 at 10:36
  • @BugFinder, nope, I update only speed text in the upper corner with reduced rate (Time.frameCount % 3 == 0) Commented Mar 27, 2023 at 18:04
  • Every 3 frames is still a fair bit. That could easily be 20 times a second. What happens if you drop that even more? Commented Mar 27, 2023 at 21:10
  • @BugFinder, I turned off all elements in the Update (speed text and navigation map), but this lags remains. It's probably something wrong with the controlling frame rate on the Unity's side since I'm forcing 30 fps at the start. Also, if I turn on a screen recorder that is set to 30 fps, everything works perfectly... Commented Mar 28, 2023 at 12:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.