- Home /
Question by
Jaap Kreijkamp · Dec 31, 2010 at 07:17 AM ·
runtimeopenglcheckdirectx
Easy way to check if DirectX is used as renderer (instead of Open GL or Open GL ES)
Title says it all, is the a simple way in code to check if Unity uses Direct X instead of Open GL (note that even on windows you can have unity run on Open GL, so just UNITY_STANDALONE_WIN
isn't enough).
Thanks and happy new year! Jaap
Comment
Answer by Jaap Kreijkamp · Dec 31, 2010 at 07:32 AM
The most reliable way I can find is SystemInfo.graphicsDeviceVersion.StartsWith("Direct")
is there a better way?
You can also use this:
http://docs.unity3d.com/ScriptReference/Rendering.GraphicsDeviceType.html