Should i switch from URP to Built-in?

Hello;

I have some performance issue in my game, im using latest LTS version with URP 10.7.0 and my test device is Huawei P20 Lite. I don’t know exactly what category this device is in(low-end or mid-range). i did so many research on google and forum using mesh combiner tool with atlas generator, very few post procesing volume effect no shadow, only one directional light but still I could not get a smooth game performance. Yes i can test the game on android device but there is a noticeable FPS issue.

This is my main thread:


Render thread:


Memory profile:


Stats window:


How can i decrease CPU and Render Thread ms or Is my problem related to this? Should I focus on something else? If there is any other information you want, I can give it immediately. I can’t make any progress this way. I would be glad if you enlighten me. Thank you in advance for your time.

*Edit fix img URL.

the only way to find out is to make a duplicate project and test the difference there

Thank you for your answer. Yes, you may be right about that, but what do I need to change? Where should I concentrate, I can’t change the whole project. If this is the only way, of course I will change it, but I don’t think there is a need for such a thing.

*Edit i just get what u mean. I don’t know yet if the problem is related to the URP.

I mean, sure, you could copy all the scripts over to a new project, setup new shaders and project settings and all that stuff with the standard renderer, and see if it’s better there, but I don’t think anyone’s actually engaged with your Profiler screenshots yet.

Why is URP’s WaitForPresentOnGFXThread taking 47.5% of the frame time? I don’t know enough about Android builds to know what causes this sort of choking/stuttering, I’ve never experienced it with my PC URP builds.

I don’t know that either. I tried every optimization suggestion I could find. As I said before, shadows disabled, 1 directional light in scene, using mesh combiner with atlas generator, V-sync off, using fixed dpi, all URP quality settings low, Render scale 0.5. But profiler still looking GPU bound. If its related to the URP yea sure i can make copy of my project and try switch to built-in.

The whole WaitForPresent thing should be related to Vsync btw. Its not taking a long time because its doing something expensive, its literally just waiting.

Thank you for reply,
Vsync was disabled in quality settings, but used Application.targetFrameRate. Even if both are off, result same.

You can read a lot about it here

WaitForPresent means that you’re waiting for Vsync. I don’t have enough experience on Android, but on iOS you are always v-synced, there’s no concept as Vsync off.

Your problem probably is that you are unable to hit stable 60fps: cap the game at 30fps or optimise it to hit constant 60fps.

Gfx.WaitForPresent means you are not cpu bound

WaitForPresentOnGFXThread means you’re GPU bound.
Your bottleneck is the GPU.

Profiler has a GPU module, don’t know if it works for your device though.
If it doesn’t, there’s probably still a a way to profile your GPU performance.

Thank you for your reply and sorry for late response i was looking through the link you send me and found some information that I think will be useful. I will try them.

1 Like

As I said before. The same problem persists whether Vsync is on or off and yes i need to optimize the game but I did everything I could think of.

Like @PutridEx said problem is GPU bound certainly.

Unfortunately GPU module does not work with the device. But like u said ill try to find a way to profile GPU. I am using Huawei P20 Lite as a test device and it have Mali GPU i’ll try to profile with Arm Mobile Studio as soon as possible. Thank you for advices.

Yep, but I’m quite sure that Android is always Vsynced, regardless of the settings that you choose in engine. So the answer is: the game is simply unable to hit the target frame rate and you’re waiting to hit the vsync.

Its always on with IOS

https://discussions.unity.com/t/737836

1 Like

Acording to docs you can control Vsync in android but in IOS like u said, always on.
https://docs.unity3d.com/2020.3/Documentation/ScriptReference/QualitySettings-vSyncCount.html

I’m not an Android expert, but I think that all mobile phones flip on some kind of vblank, Android included.

Anyway, it’s clear that you’re GPU bound: I don’t think switching to built-in will solve your problem, it’s an optimisation issue.