# VFX 图形：粒子系统中检测到缓冲区溢出

- **ID:** `unity/vfx-graph-buffer-overflow`
- **领域:** unity
- **类别:** resource_error
- **错误码:** `VFX-001`
- **验证级别:** ai_generated
- **修复率:** 80%

## 根因

VFX 图形中的粒子系统因粒子数量或生命周期过多而超出分配的缓冲区容量。

## 版本兼容性

| 版本 | 状态 | 引入 | 弃用 |
|------|------|------|------|
| Unity 2022.3 | active | — | — |
| Unity 2023.1 | active | — | — |
| Unity 2023.2 | active | — | — |

## 解决方案

1. ```
   在 VFX 图形中降低生成速率或粒子生命周期。例如，将“生成速率”设置为每秒 50 个粒子，“生命周期”设置为 2 秒。
   ```
2. ```
   在 VFX 图形资源设置中启用“容量”自动调整或增加缓冲区容量，路径为“粒子”>“容量”。
   ```

## 无效尝试

- **Increase the 'Max Particles' property in the VFX Graph inspector to a very high value.** — Simply increasing max particles without optimizing spawn rates or lifetime can still cause overflow if the system is poorly designed. (40% 失败率)
- **Disable all VFX Graph components in the scene to see if the error disappears.** — This only masks the issue; the root cause (buffer overflow) remains and may reappear when VFX is re-enabled. (60% 失败率)
