Instance Method

init

Initializes a new entity object.

Declaration

- (instancetype)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.

See Also

Creating an Entity

+ entity

Creates a new entity object.