Is it normal to experience stuttering in the game preview/playback in Unity when vsync is enabled (Vsync Count: Every V Blank). System is a i7-6700k + GTX 1080 with a clean install of Windows 10 Pro and Unity 2017.1.0f3.
Even with very basic projects such as the 2D Character Demo in the “Standard Assets Example Project” bundled with Unity this issue occurs for me. If I build the project and run it outside Unity it’s smooth in every configuration (vsync on/off, windowed/full screen). Inside Unity however, if I have “Vsync Count” set to “Every V Blank” the game preview/playback stutters a lot. If I disable Vsync (Vsync Count: Don’t Sync) it mostly eliminates the stuttering, but I don’t want my GPU constantly pumping out 4000fps in a 2D game to work around an issue that doesn’t seem like it should be there.
I had seen some people suggest using the DX9 renderer instead of DX11 but that made no difference for me.
Does anyone have any other ideas? Thanks in advance.
…it runs with a lot less stuttering. It feels really ugly having to do this though, why does it run smoothly with vsync enabled / 60fps outside in the built game yet it stutters with vsync enabled inside the editor game preview?
Nearly 12 months on this problem still exists, surely there must be other people frustrated by the stuttering inside the unity game preview when vsync is on (Every V Blank)?
The code run in the editor is not optimized compared to in a build, and there’s a lot editor overhead when playing in the editor that won’t be in your build version. You can look at the profiler in the editor to see what specifically is causing the stuttering you’re seeing, but in general performance in the editor is not indicative of performance in your build.
I’m a little confused why you’re so concerned about how it performs in the editor frankly, since I would assume you’d be shipping a build version and not your entire project folder for use in the editor.
I understand there’s a lot of editor overhead but it only stutters in the editor with vsync set to “Every V Blank”, with that off there’s no stuttering. It’s not a performance problem, the profiler shows nothing out of the ordinary when the stutters occur, it purely seems to be a bug related to the editor preview & vsync being on. I could even have a very basic scene with a single ball moving across a plane and it would still stutter (with an i7-8700K & 1080 Ti and every other HW configuration I’ve tested), this shouldn’t be happening.
The reason it’s annoying is because, while previewing a game I want to be able to immediately see if any stuttering / non-smooth motions are caused by my code without having to waste time repeatedly building the project but still have vsync on like the production build will have.