# NullReferenceException: UniversalRenderPipeline.asset缺失或未在图形设置中分配

- **ID:** `unity/urp-renderer-missing`
- **领域:** unity
- **类别:** config_error
- **验证级别:** ai_generated
- **修复率:** 95%

## 根因

在项目设置 > 图形中未分配URP渲染管线资源，或者该资源已被删除或损坏。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Unity 2022.3 | active | — | — |
| Unity 2023.2 | active | — | — |
| URP 14.0 | active | — | — |
| URP 16.0 | active | — | — |

## 解决方案

1. ```
   Go to Project Settings > Graphics, and under 'Scriptable Render Pipeline Settings', assign the UniversalRenderPipelineAsset (e.g., from Assets/Settings/URP-HighQuality.asset). If missing, create a new one via Assets > Create > Rendering > URP Asset (with Universal Renderer).
   ```
2. ```
   If the asset file is deleted, recreate it: Right-click in Project window, select Create > Rendering > URP Asset (with Universal Renderer), name it, then assign in Graphics Settings.
   ```

## 无效尝试

- **** — Reimporting all assets does not assign the missing pipeline asset; the Graphics Settings need manual update. (70% 失败率)
- **** — Reinstalling URP package without assigning the asset in settings leaves the error unresolved. (50% 失败率)
