Unity Game Preview Lagging With DirectX 11
I've recently built a new PC and after trying to use Unity for the first time, I opened a project which worked perfectly on my old PC, but now on this new one the game preview stutters. I've got basically an empty scene with a capsule that moves when holding down a key. It used to move perfectly smooth but now it's lagging the entire time.
I've noticed that when I start unity with the -force-opengl command line argument it works fine, but I can't help feeling this is just sidestepping a larger problem and I'd rather sort out the actual problem itself instead of working around it. Could any of you help out with this? Thanks in advance!
**Edit
Turns out it's DirectX 11 causing the problem, I went into the Project Settings > Player Settings and switched from DX11 to DX9 and it works perfectly... I still have no idea why it's not happy with DX11 though, so any help with that would be appreciated!
I have the exact same issue, and it's really annoying. DirectX 11 causes a gfx.waitforpresent spike in the profiler, and turning off vsync didn't help. I even messed around with target framerate, settings in my Nvidia Control Panel, and making sure there weren't refresh rate discrepancies between the Nvidia drivers and Windows, all to no avail. I think it's most likely a bug Unity needs to fix.
Answer by x4000 · Jan 26, 2017 at 05:38 PM
Figured I would throw in my two cents that this has also been a problem for me, on four different computers, on Windows 7 and Windows 10, from Unity 4.x to now Unity 5.5.
Not only do I get strange visual glitches, but also enormous amounts of lag. Only in the editor: running anything else under the sun, including standalone unity games, works great.
For a couple of years I figured it was something on my computer, then I upgraded computers... and then upgraded again... and installed on a second computer to check it again... no dice. All nVidia cards, three were laptops and one was not. Current problem is on windows 10 with a 1080 on latest drivers, so it's no slouch.
It's strange that this still hasn't been fixed, I've noticed a few other people with the same problem and there still doesn't seem to be any consistent cause or any way to fix it. Here's hoping it's somehow fixed in a future patch! I'm beginning to think it might not only be a Unity problem though, I'm getting almost exactly the same type of lag in 3DS $$anonymous$$ax, even though I only have a basic scene open. This only seems to happen when I have all four viewports visible at once, and stops happening when I maximise a viewport. Not sure if you're getting the same problem in that, would be interesting to find out though!
For me it's just all the time, immediately, as soon as I log into Unity. I don't use $$anonymous$$aya (my artist does), but in my brief usage of it I never had any problems. Sketchup, Vue, Photoshop, and similar all perform great for me. Unity is literally the only program I've had unexpected lag on, and it's been on 3+ computers now. :/ Only DX11.
Hopefully it will be moot with Vulkan, but I have not tested that yet.
Answer by Raditz_X_RAG3 · Jun 22, 2016 at 05:07 PM
After weeks of struggling with this I found something that fixed my problem. After installing a completely different program called SyncToy by Microsoft, the DirectX 11 related lag went away. The reason I think this happened, is because I also installed the .NET 2.0 framework with it. Just install the framework here and it should fix it.
I just tried installing both the framework, and the SyncToy program you mentioned, but sadly I'm still getting the lag :\ Is there anything else you done around the same time which might have fixed it? Either way, glad to hear it's fixed for you though!
Well I reinstalled Unity several times, so you could try a reinstall.
That's a good point actually, I've not tried that yet! I'll give it a go, thanks!
Answer by trintasegundos · Oct 31, 2016 at 02:40 PM
i have the same problem, any news abour reinstall unity? i have directx 11 in win10
Heyyy! Sorry, I've tried completely uninstalling, then reinstalling with the latest version, but I still haven't been able to fix it
Answer by astracat111 · Mar 11, 2018 at 04:04 PM
I'm gonna get hated for saying this, but I've been experiencing the same lag so I'm switching to using OpenGL GLES 3.0 on all platforms, from android to mac to windows.
Your answer
Follow this Question
Related Questions
Really High CPU usage On empty scenes/new projects (ApplicationTickTimer problem) profiler pics 0 Answers
Lags while camera movement (gfx.waitforpresent) 0 Answers
Why does my Scene View use 100% processor 0 Answers
Troubleshooting sudden editor lag 0 Answers
Regular stutters in performance after a minute or two 0 Answers