to test the online multiplayer mode of my game, I duplicated my project (while sharing the “Assets” & “Library\Artifacts” folders through Symlinks), and then I launch 2 Unity Editor instances and launch the game on both of them.
With only 1 Editor instance running the game, I get around 120 fps. If I launch another instance, the instance that doesn’t have the focus sees its fps dropping to 10~20fps.
If I use 1 editor & 1 build, both run around 70~80 fps, and are not affected by having or not the focus.
Anyone would know how to fix that behavior ? It makes it very hard to test when 1 editor instance runs much slower than the real thing…
Notes :
the scene view is hidden ; only the game view is active
I use Unity 2019.4.20f1 ; it was the same with 2019.4.13f1
I have encountered that as well when running multiple editors a few pieces of advice I can give:
Lock your game to a low but acceptable framerate with Application.targetFrameRate = 60; That will give you an overall higher FPS in both editors because there’s less fighting for CPU resources.
There is a setting in Edit/Preferences/General called “Interaction Mode” setting it to “No throttling” can help with performance when running multiple editors.
Make sure the '‘Run In Background’ checkbox is checked in Project Settings/Player.
@luke-unity ,
only doing “Application.targetFrameRate = 60” was enough to get both editors running at 60 fps ! ('‘Run In Background’ was already checked)
Windows automatically gives the focused application a priority boost. So two otherwise identical applications with no caps on framerate, you should expect the focused one to be allocated more CPU time, which can result in a higher framerate.