unity system_error ai_generated true

InvalidOperationException: Graphics device type [OpenGLCore] is not supported on this platform. Please switch to Direct3D11 or Vulkan.

ID: unity/invalidoperationexception-graphicssettings-mismatch

Also available as: JSON · Markdown · 中文
85%Fix Rate
88%Confidence
1Evidence
2024-03-12First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
Unity 2022.3.20f1 active
Unity 2023.1.10f1 active
Unity 6000.0.0b1 active

Root Cause

The project's graphics API settings in Project Settings > Player are incompatible with the current build platform, e.g., OpenGLCore selected for Windows Standalone which requires D3D11.

generic

中文

项目设置 > Player 中的图形 API 设置与当前构建平台不兼容,例如为 Windows Standalone 选择了 OpenGLCore,而该平台需要 D3D11。

Official Documentation

https://docs.unity3d.com/Manual/GraphicsAPIs.html

Workarounds

  1. 90% success Open Edit > Project Settings > Player > Other Settings > Rendering. Uncheck 'Auto Graphics API' and remove OpenGLCore from the list. Add Direct3D11 (Windows) or Vulkan (Linux/Android). Then rebuild.
    Open Edit > Project Settings > Player > Other Settings > Rendering. Uncheck 'Auto Graphics API' and remove OpenGLCore from the list. Add Direct3D11 (Windows) or Vulkan (Linux/Android). Then rebuild.
  2. 80% success If building for Android, ensure 'Minimum API Level' is set to at least 24 and Vulkan is selected as the primary graphics API.
    If building for Android, ensure 'Minimum API Level' is set to at least 24 and Vulkan is selected as the primary graphics API.

中文步骤

  1. Open Edit > Project Settings > Player > Other Settings > Rendering. Uncheck 'Auto Graphics API' and remove OpenGLCore from the list. Add Direct3D11 (Windows) or Vulkan (Linux/Android). Then rebuild.
  2. If building for Android, ensure 'Minimum API Level' is set to at least 24 and Vulkan is selected as the primary graphics API.

Dead Ends

Common approaches that don't work:

  1. 90% fail

    The error is not caused by missing drivers; it's a project configuration issue.

  2. 95% fail

    Graphics API settings are stored in ProjectSettings/ProjectSettings.asset, not in Library.

  3. 85% fail

    The error is about graphics API, not CPU architecture.