Type Method

sceneWithFileNamed:

Loads the specified SpriteKit scene file, creating a GKScene object containing the SpriteKit scene and associated GameplayKit objects.

Declaration

+ (instancetype)sceneWithFileNamed:(NSString *)filename;

Parameters

filename

The name of a scene file in your app’s main bundle.

Return Value

A new GameplayKit scene.

Discussion

Use this initializer to load SpriteKit scenes (.sks files) created in the Xcode SpriteKit scene editor that contain associated GameplayKit entities, components, and pathfinding graphs.

See Also