---
title: removeAllObstacles()
framework: gameplaykit
role: symbol
role_heading: Instance Method
path: gameplaykit/gkobstaclegraph/removeallobstacles()
---

# removeAllObstacles()

Removes all obstacles from the graph.

## Declaration

```swift
func removeAllObstacles()
```

## Discussion

Discussion After removing obstacles, the GKObstacleGraph class automatically creates, removes, or rearranges nodes and edges where necessary to describe the navigable area around the remaining nodes.

## See Also

### Working with Obstacles

- [obstacles](gameplaykit/gkobstaclegraph/obstacles.md)
- [addObstacles(_:)](gameplaykit/gkobstaclegraph/addobstacles(_:).md)
- [removeObstacles(_:)](gameplaykit/gkobstaclegraph/removeobstacles(_:).md)
- [nodes(for:)](gameplaykit/gkobstaclegraph/nodes(for:).md)
