Contents

init()

Initializes a new entity object.

Declaration

init()

Return Value

A new entity object.

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.