Search code examples
unity-game-enginedirectxraytracing

Get DirectX version by script UNITY


I want to know by script witch version of directX my project his. (is for a Unity tool)

Exemple here

I want to use it like this : if(DirectX == "DX12") { ... }


Solution

  • Based on this document, you can write something like this:

    if (SystemInfo.graphicsDeviceType == GraphicsDeviceType.Direct3D12)
    {
            
    }