- Home /
Editor playback performance on Windows
This has been an issue that's been puzzling me for awhile: When I test a game in the Editor in the 'Game' view, the refresh rate of the screen seems both low and kind of inconsistent. 'Jittery' or 'choppy' are good words to describe it.
Several things worth noting:
I get the same behavior on my custom-built Windows desktop (Windows 10, Nvidia GTX 750 Ti, Intel Core i5 3.0 GHz quad-core, 8 GB RAM), and a Samsung Windows laptop (not sure about its specs, but it's running Windows 8.1 and has an AMD graphics card.)
My project isn't causing the issue. I've tried a bunch of different, very basic test projects and I always get the same behavior. Plus, even though I get the choppy playback in the editor, projects always run as smooth as silk after being built & ran.
Despite the visuals looking choppy (in the 20-40 fps range), the editor's Stats overlay reports a blazing 80-140 fps, and gameplay is unaffected. It seems like the screen just isn't being redrawn often enough or something.
This issue does not exist on any Mac machine I've tested it on. Testing games in the editor always results in silky smooth performance on my comparatively puny MacBook Air.
Has anyone else noticed this, and if so, is it just something people are generally happy enough to live with? I'm working on a tough, fast-paced 2D platformer, so framerate inconsistencies -- even though they're just on a visual level, not a gameplay or input level -- are a bit frustrating to deal with.
Update: I just installed the Linux version of the Unity Editor on the same Nvidia GTX 750 Ti machine. I get perfectly smooth performance when testing games in the experimental Linux editor. The Windows editor still gives me choppy performance, even under the latest release (5.1.3).
@getyour411 Unfortunately didn't help. I've tweaked the vSyncCount and targetFrameRate values quite a bit in the past, but I've never been able to eli$$anonymous$$ate the issue on Windows.
Again, it's only present in the Windows version of the Unity Editor. Standalone builds of the game look just fine on Windows, and the editor performs smoothly on $$anonymous$$ac.
Answer by Eudaimonium · Aug 27, 2015 at 08:58 PM
I have noticed that the in-editor Game view performance (when playing) goes up considerably if you make sure that:
1) Game view is set to Maximize on Play, so it occupies the full size of the Editor,
2) There are no other windows or pieces of Editor separated from main window. Close all windows from secondary monitors or merge them with existing window, so there's literally nothing else to the entire Unity interface except game view.
Apparently, having any other editor components (Scene view, animator, whatever, even Store) along with the window where Game is being drawn cuts the performance down roughly in half, which sounds roughly the same to what you're experiencing. I am also having Game View Stats window reporting crazy performance. A custom script drawing FPS counter on screen differs to that in that case, but is consistent when only Game view is visible.
NOTE: I am only seeing this in my very old laptop (nVidia 9300M). On my main PC which is comparable to yours (Core i5 4th gen, 8GB RAM, GTX 560) I am not experiencing this problem, but I am currently working on an extremely low hardware requiring project so I'm not actually able to tell if the same problem would persist on my main PC with heavier project running (I mean graphically more intensive).
Thanks, I closed the scene view and have it set to maximize on play, and so far it seems to be helping. I still get random intervals where the draw rate noticeably drops, but it's easier to deal with for basic testing now.
$$anonymous$$y game's a simple 2D game that uses low-res pixel art, so it's not really graphics-intensive either. I've also measured the game's actual framerate and it definitely isn't suffering during the hiccups in the editor -- right now my guess is that for some reason, on Windows, the editor's Game view doesn't always get repainted often enough. Probably explains why removing views can help alleviate the problem.
Edit: BTW, I want to use the editor a bit more to make sure the problem doesn't return before I accept this as an answer. Though even if it doesn't, I still feel like this is a problem the Unity devs should probably address.
I'd assume so.
BTW also try experimenting with $$anonymous$$aximize on play - in my case it sometimes helps to actually not use it simply because of the lower game rendering resolution, it's a 3D game on an ancient laptop so it sometimes helps, though your 2D game surely isn't strangling your GTX 750, so maybe having less editor elements may benefit you more. Try both options, see what works.
Also try running a profiles JUST to make sure you don't have something weird going on your scene that actually does choke a GTX down.
Your answer
Follow this Question
Related Questions
Unity editor low frame rates and flashing while pressing keys 1 Answer
Why are small and basic particle so expensive? 1 Answer
Animation of terrain causes drastic performance drop (fps) 0 Answers
Opening profiler increases FPS 1 Answer
Switch focus to Unity on Mac Mojave makes git refreshing index for over 30 seconds 0 Answers