I noticed high CPU usage if I'm running unity app in Firefox, not sure about other browsers. Even for very simple project (one box and one camera with very simple movement script).
I have Core 2 Duo and one of the CPUs is used up to 100% sometimes, usage jumps from 0 to 100% without any activity. Especially it going up if i'm switching to another tab (just for regular surfing). Such behaviour makes browser usage (with unity game open in one tab) very uncomfortable.
Is it possible to fix it somehow?
Answer by jonas-echterhoff
Jun 22, 2010 at 02:41 PM
There are two things you can do to change CPU load.
One is the "run in background" checkbox in the build settings. If that is checked, you should not get any CPU usage when unity is not in the front window/tab.
The other relevant setting is Application.targetFrameRate. By setting this to a lower value, you can tell Unity not to try to run at any frame rate higher then what you set here, and idle for the remaining time.
Looks like it is some problem with unity plugin for firefox. I checked IE and Chrome, they working fine.
I made some tests on multiple PCs. Problem is 100% reproducable. If unity application is opened in one tab, switching to another tab causes 100% CPU usage. It doesn't depend on "Run in background" checkbox.
I will do more tests with Application.targetFrame rate later.
Ok, this sounds like a bug. As I'm only working on the mac side of things i cannot tell you anything specific about it - it could be our bug, or it could be mozilla's, but in any case I suggest reporting it using our bug reporter.
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
The best place to ask and answer questions about development with Unity.
To help users navigate the site we have posted a user guide.
If you are a new user, check out our FAQ for more information.
If you are a moderator, see our Moderator Guidelines page.
We are making improvements to UA, see the list of changes.
For troubleshooting common problems with Unity 5.x Editor (including Win 10).
Answers and Comments
No one has followed this question yet.
Is Unity a good fit for an embedded (web) model file browser?
Android : Open the phones web browser
Browser to webplayer communication problem
Capturing sound input with low latency