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

- **ID:** `unity/invalidoperationexception-graphicssettings-mismatch`
- **领域:** unity
- **类别:** system_error
- **验证级别:** ai_generated
- **修复率:** 85%

## 根因

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

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Unity 2022.3.20f1 | active | — | — |
| Unity 2023.1.10f1 | active | — | — |
| Unity 6000.0.0b1 | active | — | — |

## 解决方案

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.
   ```

## 无效尝试

- **** — The error is not caused by missing drivers; it's a project configuration issue. (90% 失败率)
- **** — Graphics API settings are stored in ProjectSettings/ProjectSettings.asset, not in Library. (95% 失败率)
- **** — The error is about graphics API, not CPU architecture. (85% 失败率)
