# NavMeshObstacle: Carve mode is enabled but the obstacle is not moving. This may cause performance issues if the obstacle is static.

- **ID:** `unity/navmesh-obstacle-carve-not-moving`
- **Domain:** unity
- **Category:** config_error
- **Verification:** ai_generated
- **Fix Rate:** 95%

## Root Cause

A NavMeshObstacle component has Carve mode enabled on a static object, causing unnecessary navmesh carving updates that degrade performance.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| Unity 2020.3.0f1 | active | — | — |
| Unity 2021.3.0f1 | active | — | — |
| Unity 2022.3.0f1 | active | — | — |
| Unity 2023.2.0f1 | active | — | — |

## Workarounds

1. **Disable Carve mode on static obstacles: Select the GameObject, in the NavMeshObstacle component, uncheck 'Carve'. Use this code snippet to automate: GetComponent<NavMeshObstacle>().carving = false;** (95% success)
   ```
   Disable Carve mode on static obstacles: Select the GameObject, in the NavMeshObstacle component, uncheck 'Carve'. Use this code snippet to automate: GetComponent<NavMeshObstacle>().carving = false;
   ```
2. **If the obstacle is intended to move, attach a script that toggles carving on movement: void Update() { if (transform.hasChanged) { GetComponent<NavMeshObstacle>().carving = true; } else { GetComponent<NavMeshObstacle>().carving = false; } }** (85% success)
   ```
   If the obstacle is intended to move, attach a script that toggles carving on movement: void Update() { if (transform.hasChanged) { GetComponent<NavMeshObstacle>().carving = true; } else { GetComponent<NavMeshObstacle>().carving = false; } }
   ```

## Dead Ends

- **Disable and re-enable the NavMeshObstacle component at runtime** — This does not change the Carve mode setting and the static obstacle still triggers carving warnings. (90% fail)
- **Increase the carving update interval in NavMesh settings** — The warning is about the mode being inappropriate for static objects, not about update frequency. (85% fail)
