---
title: "removeComponent(foundIn:)"
framework: gameplaykit
role: symbol
role_heading: Instance Method
path: "gameplaykit/gkcomponentsystem/removecomponent(foundin:)"
---

# removeComponent(foundIn:)

Removes any instances of the component system’s component class in the specified entity from the component system.

## Declaration

```swift
func removeComponent(foundIn entity: GKEntity)
```

## Parameters

- `entity`: An entity.

## Discussion

Discussion This method examines the components array of the specified entity, removing any components whose type matches the component system’s componentClass property from the component system. If those components are not in the component system, this method has no effect.

## See Also

### Managing a List of Components

- [componentClass](gameplaykit/gkcomponentsystem/componentclass.md)
- [components](gameplaykit/gkcomponentsystem/components.md)
- [addComponent(_:)](gameplaykit/gkcomponentsystem/addcomponent(_:).md)
- [addComponent(foundIn:)](gameplaykit/gkcomponentsystem/addcomponent(foundin:).md)
- [removeComponent(_:)](gameplaykit/gkcomponentsystem/removecomponent(_:).md)
