---
title: "init(componentClass:)"
framework: gameplaykit
role: symbol
role_heading: Initializer
path: "gameplaykit/gkcomponentsystem/init(componentclass:)"
---

# init(componentClass:)

Initializes a component system to manage components of the specified class.

## Declaration

```swift
init(componentClass cls: AnyClass)
```

## Return Value

Return Value A new component system.

## Discussion

Discussion Each GKComponentSystem object manages components of a specific GKComponent subclass, which you specify with the class parameter in this intializer. After initializing a component system, you may add components to it only if their type matches the system’s component class. For more information, see GameplayKit Programming Guide.
