Version: Unity 6.3 Beta (6000.3)
LanguageEnglish
  • C#

GraphicsDeviceType

enumeration

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

Description

Graphics device underlying backend API type.

The GraphicsDeviceType enumeration identifies the specific graphics API (like Direct3D, Vulkan, Metal, OpenGL) that Unity is currently using for rendering. Because Unity supports multiple APIs to run on diverse platforms and hardware, developers can query this type using SystemInfo.graphicsDeviceType. Knowing the active API (e.g., GraphicsDeviceType.Direct3D11, GraphicsDeviceType.Vulkan, GraphicsDeviceType.Metal) enables developers to customize rendering logic, apply platform-specific optimizations, maintain compatibility across different hardware, or debug issues caused by API-specific behaviors or feature differences.

Additional resources: SystemInfo.graphicsDeviceType.

using UnityEngine;
using UnityEngine.Rendering;

public class GraphicsDeviceTypeLog : MonoBehaviour { void Start() { switch (SystemInfo.graphicsDeviceType) { case GraphicsDeviceType.Direct3D11: Debug.Log("Using DirectX 11."); break; case GraphicsDeviceType.Vulkan: Debug.Log("Using Vulkan."); break; default: Debug.Log("Using another graphics API."); break; } } }

Properties

Property Description
Direct3D11Direct3D 11 graphics API.
NullNo graphics API.
OpenGLES3OpenGL ES 3.0 graphics API. (deprecated on iOS and tvOS).
PlayStation4PlayStation 4 graphics API.
XboxOneXbox One graphics API using Direct3D 11.
MetaliOS Metal graphics API.
OpenGLCoreOpenGL (Core profile - GL3 or later) graphics API.
Direct3D12Direct3D 12 graphics API.
VulkanVulkan.
SwitchNintendo Switch graphics API.
XboxOneD3D12Xbox One graphics API using Direct3D 12.
GameCoreXboxOneGame Core Xbox One graphics API using Direct3D 12.
GameCoreXboxSeriesGame Core XboxSeries graphics API using Direct3D 12.
WebGPUWebGPU (EXPERIMENTAL).