Hi everyone,
I am developing a windows standalone game. If I run it in the editor, the stats gui tells me it runs at about 400fps. Additionally I implemented my own counter with: Debug.LogError(1.0f / Time.deltaTime);
The results are mostly comparable between my counter and the stats card.
If I build my game and execute it from its build directory, it prints me always 30fps. I built it in developer mode to have the console active in the build. It is not just a matter of fixed frame rate, my game isn’t functioning properly outside the editor, as it relies on quick calls of the update() function.
I researched this problem and did serveral things to solve it, however none worked.
- I went into ProjectSettings → Quality and deactivated vSync for every Quality tier
- I added
QualitySettings.vSyncCount = 0;
Application.targetFrameRate = -1;
in the void Start() of a gameobject
- I went into my nvidia settings → 3d settings and turned off vSync.
I am running on a core i7 and a gtx 770.
How to get rid of this fps limitation?
Did you try using the profiler to figure where the time is being spent?
Yeah, The player loop just takes 61ms instead of 2.2ms in the editor. It just takes longer, which is weired.
A friend of mine doesn’t have this problem on his pc, so it seems to be a local problem.
I installed the newest nvidia drivers, doublechecked all settings regarding vsync and the unity settings.
I am using a 4k monitor, maybe that comes into play?
Did you try running it in windowed mode at a resolution similar to the editor?
Did you make sure the NVIDIA card is selected as system default?

I ran it on the exact same resolution as the editor, no change from 30fps at all.
I’ll include the log file (just the start, it just continues like that) in this post, I deactivated the profiler for this build to minimize impact on the framerate. The fps are printed in the logfile.
@adamgolden There is no such setting on my pc. (it says vsync off in the red marking)
6335232–703299–log.txt (7.63 KB)
You should open up the timeline view of the profiler. Can you show a screenshot of that?
Editor run: (playmode) Eveything as it should, game is doing almost nothing
Standalone Run: 30fps consistant, resolution is same, all vsync is off etc.
It is easier to see in this zoomed view. My scripts and everything else seems to do right, this guy seems to be the problem:
Gfx.WaitForPresentOnGfxThread, waiting for what? it is an empty scene, with a tiny script…
What does your GPU usage look like in task manager when that happens?
editor playmode around 42%.
standalone build around 4 to 10%
Can you print out QualitySettings.vSyncCount? That just sounds like the build is waiting on VSync.
Yeah, i think so too. The vSyncCount is 0 always. I print it every frame now and plain 0.
You should try setting the Nvidia control panel setting to “Application controlled” instead of off. Also, make sure your game doesn’t have special settings in this section:
Doesn’t work. I tried all combinations of settings up to this point, reinstalled drivers, really a lot of things…
Can you post the contents of your player log?
I had to change the file ending to txt, .log is not allowed here
6347832–705555–Player.txt (120 KB)
Hmm, interesting. I assume you’re running on an older version of Windows?
Could you report a windows performance recorder trace of a game running at that framerate for around 10 seconds? Here’s a guide on how to do it:
https://files.unity3d.com/zilys/ETWPerfGuide/data/RecordingTraceOnPC.html
Please use “CPU usage” and “GPU activity” checkboxes. Compress the resulting trace into a .zip/.7z file and send it to me via a private message (don’t post it publicly, it may contain personally identifiable information).
The WPR seems to be broken on my pc, so I think everything is a local issue. I am going to reinstall my os and unity. If the problem persists, I contact you with the performance record.
Alright let me know how it goes.