Version: 2020.2
LanguageEnglish
  • C#

SystemInfo.graphicsDeviceVersion

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

public static string graphicsDeviceVersion;

Description

The graphics API type and driver version used by the graphics device (Read Only).

Returns a string identifying low-level graphics API kind and driver version. In most cases when you need to detect which graphics API is being used it is much easier to use SystemInfo.graphicsDeviceType.

In case of OpenGL API, the returned string will contain "OpenGL" followed by version in "major.minor" format, followed by full version string in square brackets.

In case of Direct3D9 API, the returned string will contain "Direct3D 9.0c" followed by driver name and version in square brackets.

In case of Direct3D11 API, the returned string will contain "Direct3D 11.0" followed by feature level in square brackets.

See Also: SystemInfo.graphicsDeviceType, SystemInfo.graphicsDeviceName, SystemInfo.graphicsDeviceVendor.

using UnityEngine;
public class ExampleClass : MonoBehaviour
{
    void Start()
    {
        // Prints "OpenGL 2.0 [2.0 ATI-1.4.40]" on MacBook Pro running Mac OS X 10.4.8
        // Prints "Direct3D 9.0c [atiumdag.dll 7.14.10.471]" on MacBook Pro running Windows Vista
        print(SystemInfo.graphicsDeviceVersion);
    }
}
Copyright © 2023 Unity Technologies
优美缔软件(上海)有限公司 版权所有
"Unity"、Unity 徽标及其他 Unity 商标是 Unity Technologies 或其附属机构在美国及其他地区的商标或注册商标。其他名称或品牌是其各自所有者的商标。
公安部备案号:
31010902002961