- Home /
Graphics Device Lost - Direct 3D
We're seeing the following error when running our game on OSX machines running Windows 7 (BootCamp):
HandleD3DDeviceLost
HandleD3DDeviceLost: still lost
Skipped rendering frame because GfxDevice is in invalid state (device lost)
Graphics info for the machines is:
Direct3D:
Version: Direct3D 9.0c [nvd3dum.dll 8.16.11.8861]
Renderer: NVIDIA GeForce 9400
Vendor: NVIDIA
VRAM: 241 MB (via DXGI)
Caps: Shader=30 DepthRT=1 NativeDepth=1 NativeShadow=1 DF16=0 DF24=0 INTZ=1 RAWZ=0 NULL=1 RESZ=0 SlowINTZ=0 desktop: 1920x1080 59Hz; virtual: 1920x1080 at 0,0
The game is apparently freezing after some amount of play time and then spamming the log file with these errors. This is from a standalone build created with 3.5.0f5. We're thinking it's a graphics driver issue right now, but haven't been able to reproduce this due to a lack of similar machines to test on (this is from a client machine). Any ideas on a possible cause for the graphics device being lost?
Answer by Baconaise · Jun 06, 2012 at 11:45 PM
This is a failure of the the multi-thread rendering introduced with Unity 3.5, I keep seeing it myself.
Someone here posted this toggle menu fix that allows you to turn multi-thread rendering off, you might see if this helps.
using UnityEditor;
class ExtraSettings
{
[MenuItem("Extra Settings/Enable MT Rendering")]
static void EnableMTRendering()
{
UnityEditor.PlayerSettings.MTRendering = true;
}
[MenuItem("Extra Settings/Disable MT Rendering")]
static void DisableMTRendering()
{
UnityEditor.PlayerSettings.MTRendering = false;
}
}
Yeah, I also started that thread on the Unity forums. That seems to be the workaround to use for now.
error CS0103: The name `UnityEditor' does not exist in the current context
???
Wait, does this fix only apply to the Unity editor?
How do you turn off multithreading in other builds? PlayerSettings is buried in UnityEditor, therefore, only an editor thing. Ok, so where are general player settings?
No, this affects builds as well. This script is just a way to toggle the multi-threaded rendering setting since it isn't displayed in the editor UI currently.
You just need to create this script, place it in an 'Editor' folder, and then use the menu items it defines to toggle multi-threaded rendering for builds.
Thanks Josh This technique works great, does not apply to web builds--which Unity claims doesn't support $$anonymous$$T anyhow. Nice find :)
Answer by MMortal · Aug 08, 2013 at 07:32 PM
Thank you all for this I know it is a bit outdated but have the same issue. I copied the code put it in the folder got the option in the editor toolbar and clicked off MT. Rebuilt the standalone ran it on other pcs and still everyone has the same error. It runs fine sometimes for a long time other times it starts instantly. This is on a fresh install of Windows 7 with updated DirctX, Graphic Drivers, .Net, etc.
Am I missing something here?
Running GForce GFX 560.
Your answer
Follow this Question
Related Questions
while running the executable the scene doesn`t appear 3D 0 Answers
How to verify if the player can use DX 11 shader ? 1 Answer
Native rendering plugin D3D11 device type not being set in x86 builds. 0 Answers
How can the native Unity plugin be initialized before the Direct3D rendering device is created? 2 Answers
Unity's typical end-to-end pipeline of frame rendering 1 Answer