CPU/GPU Usage in Editor: 2-5%. Usage in Build: 50+%. Why? Unity 2021.3.17

[EDIT] Problem solved for me, issue remains.
Problem was within the old (Unity 5.5) quality settings file. Replacing it with a new one solved the high CPU/GPU issue. No idea why.
Still, I’m happy and consider this solved.

The title is very vague, I know.
I’ve got a little 2D game that doesn’t display much on the initial screen - a button growing in size and going down again mostly.

When I’m in the editor, the usage of CPU/GPU is about 2 to perhaps 5 percent. But once I build it, it spikes to 50% and more - especially the GPU (which seems weird in a 2D game?).
There’s two 3d models that are animated to rotate, but they’re not shown on the initial screen - they’re not even loaded at that time.

Framerate is limited to “V-Sync”, so it shouldn’t go beyond 60fps. From what I can tell, it doesn’t. It seems it can’t even, because it stays at 30 sometimes.

The profiler wasn’t much help, apparently most of the GPU stuff is “other”.

Is it possible there’s a build setting that’s borked and causes this?

Any generic checks I can do, things to optimize?

Here some small tips:

Other than that, are you running the same resolution in unity game view? Also same fps? (Don’t assume it’s 60, measure it).

Also maybe try to understand the profiler better, there is a lot of useful info there. Maybe share some screenshots.

Good video, thanks!

I’ve already tried a few of the settings. I’ve now also tried to compile to c++, no difference (I had to install the module first, and add features to VS before it worked. No real problem, just mentioning it in case others want to try.)

No luck, though.

I’ve now started a new aproach - “Project Lobotomy”. A copy of the whole project, where I remove parts to see if anything changes.

Weirdly, I’ve removed EVERYTHING and it still uses 80% GPU. I’ve even created a new scene - completely empty - and added only that to the build.
Result: an empty unity game screen and 90% GPU usage.

A completely new, empty project doesn’t do that. So it’s something in THIS project. I just don’t understand how an empty scene can be affected by whatever it is.

[edit] …

What is the FPS?
Check the profiler

1 Like

You could try making your own FPS counter by incrementing an integer in Update().

Unless you’re running fullscreen AND your video card cooperates, you may not be getting vsync locked and your framerate may be super-super-high, which might explain high GPU.

The project is based upon an asset I bought from the store, an FPS counter was included - it showed about 20-30 FPS in the build, about 60 in the editor.

I’ve now removed almost everything - all the scripts, assets, etc… - and created an empty scene - and the build still goes to 90% GPU.
Something is seriously wrong in the project settings, but I haven’t found it yet.

[edit] OK, I can at least confirm it’s the settings - I just imported ONLY the settings from the asset into a clean project and built it → 90% GPU for an empty scene.
The asset is old, but that doesn’t really explain it, IMO…

Are you using source control? What does the diff look like after you import the asset?

No source control, but that was a good suggestion.

The original settings were in binary format, I’ve tried to compare them after I had them converted to text. There are changes, but they’re meaningless to me.

However, I’ve at least narrowed it down to the one settings file that causes these problems: QualitySettings .

I’ve done a quick test - took the qualitysettings file from a new 2d project and moved it into my project (after renaming the original qualitysetting file) - works like a charm, GPU is at about 3% (still much IMO, but apparently normal), and FPS are around 60 as they should be.

I’m uploading the quality settings file (*), maybe someone is willing to sacrifice their time to find out what causes this problem? I’m considering changing the prefix of this thread from question to bug…
The asset was made for Unity 5.5 , so maybe some settings don’t translate too well?

In any case, for me the issue is solved - thank you all for your help!


  • Note: Technically this is part of the asset I bought from the store, so I’m not 100% sure about the legality - but since it’s merely the quality settings, and not any actual coding or “true” asset, I think this should be fine. I don’t think there’s anything secret in here after all these years.
    If a mod thinks otherwise, feel free to remove it of course.

8923655–1222625–QualitySettings.txt (6.45 KB)

1 Like