# ArgumentException：TilemapRenderer 不支持多个排序层。仅使用第一个排序层。

- **ID:** `unity/tilemap-rendering-corruption`
- **领域:** unity
- **类别:** runtime_error
- **验证级别:** ai_generated
- **修复率:** 90%

## 根因

TilemapRenderer 组件被分配给属于多个排序层的游戏对象，这是不允许的。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| 2021.3.32f1 | active | — | — |
| 2022.3.15f1 | active | — | — |

## 解决方案

1. ```
   Ensure the Tilemap GameObject has only one sorting layer: remove any additional SortingGroup components or set them to None.
   ```
2. ```
   If using a parent SortingGroup, move the TilemapRenderer to a child GameObject and sort via the parent only.
   ```

## 无效尝试

- **** — The sorting layer assignment is persistent in the scene; toggling doesn't change the actual sorting layers. (95% 失败率)
- **** — The new Tilemap inherits the same sorting layer settings from the TilemapRenderer preset; issue persists. (70% 失败率)
- **** — The error is about multiple sorting layers on the same GameObject, not the specific layer value; 'Default' may still conflict if another component sets a different layer. (50% 失败率)
