Contents

GKSKNodeComponent

A component that manages a SpriteKit node.

Declaration

class GKSKNodeComponent

Overview

Adding a GKSKNodeComponent object to an entity automatically updates the entity property of the component’s SpriteKit node (an SKNode object) to point to that entity.

When you add entities and components to a node in the Xcode SpriteKit scene editor, Xcode automatically creates a GKSKNodeComponent object to manage the relationship between that SpriteKit node and the GKEntity object that node represents. Load the scene file with the GKScene class to access these entities and components.

For more information on Entity-Component architecture, read Entities and Components in GameplayKit Programming Guide.

Topics

Creating a SpriteKit Component

Accessing the Component’s SpriteKit Node

See Also

Xcode and SpriteKit Integration