Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unity takes 100% CPU in an empty scene

Why when we build a game scene with unity3d it uses 100% of CPU ?!

I mean it's not a matter of a scene with many objects and things or an empty scene, in both cases CPU usage is 100%.

Why?

How can I reduce it?

The reason that I want to reduce CPU usage is : I want to run multiple exe in a dedicated server for a multiplayer game that I made with unity UNET and in this scenes, I have nothing except some functions and syncvars even I have no update function ... I just want to make this exe files use less CPU to running better and increase performance.

Is that Possible to reduce CPU usage?

like image 631
iman_sh Avatar asked Nov 30 '22 14:11

iman_sh


1 Answers

I found the solution. It's just because of that I wasn't preset targetframerate on my scripts...

If we don't set it, then the game trying to run on highest frame rate as it can and if we run it on batch mode , then it will take all of the CPU usage.

like image 152
iman_sh Avatar answered Dec 04 '22 20:12

iman_sh