---
title: init()
framework: gameplaykit
role: symbol
role_heading: Initializer
path: gameplaykit/gkentity/init()
---

# init()

Initializes a new entity object.

## Declaration

```swift
init()
```

## Return Value

Return Value A new entity object.

## Discussion

Discussion If you create a GKEntity subclass and define any additional initializers, you must delegate to this initializer. You do not need to subclass GKEntity to use Entity-Component architecture—generally, you should create a custom entity class only when you need a place to store state or resources that are shared by multiple components. For more information, see GameplayKit Programming Guide.
