unity system_error ai_generated true

InvalidOperationException:图形设备类型 [OpenGLCore] 在此平台上不受支持。请切换到 Direct3D11 或 Vulkan。

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

ID: unity/invalidoperationexception-graphicssettings-mismatch

其他格式: JSON · Markdown 中文 · English
85%修复率
88%置信度
1证据数
2024-03-12首次发现

版本兼容性

版本状态引入弃用备注
Unity 2022.3.20f1 active
Unity 2023.1.10f1 active
Unity 6000.0.0b1 active

根因分析

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

English

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

官方文档

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

解决方案

  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.

无效尝试

常见但无效的做法:

  1. 90% 失败

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

  2. 95% 失败

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

  3. 85% 失败

    The error is about graphics API, not CPU architecture.