One Logo Pool Ball
GameplayKit · IOS API REFERENCE

GKScene

class · iOS 10.0+ · SDK 27.1

class GKScene

Members (10)

init · iOS 10.0+

init

TypeScript
static initFileNamed(filename: string): (GKScene) | null
Swift declaration
convenience init?(fileNamed filename: String)
init · iOS 10.0+

init

TypeScript
static initFileNamedRootNode(filename: string, rootNode: Implements<GKSceneRootNodeType> | SDKHandle): (GKScene) | null
Swift declaration
convenience init?(fileNamed filename: String, rootNode: any GKSceneRootNodeType)
method · iOS 10.0+

addEntity

TypeScript
addEntity(entity: GKEntity): void
Swift declaration
func addEntity(_ entity: GKEntity)
method · iOS 10.0+

addGraph

TypeScript
addGraph(graph: GKGraph, name: string): void
Swift declaration
func addGraph(_ graph: GKGraph, name: String)
method · iOS 10.0+

removeEntity

TypeScript
removeEntity(entity: GKEntity): void
Swift declaration
func removeEntity(_ entity: GKEntity)
method · iOS 10.0+

removeGraph

TypeScript
removeGraph(name: string): void
Swift declaration
func removeGraph(_ name: String)
get · iOS 10.0+

entities

TypeScript
get entities(): Array<GKEntity>
Swift declaration
var entities: [GKEntity] { get }
get · iOS 10.0+

graphs

TypeScript
get graphs(): Record<string, GKGraph>
Swift declaration
var graphs: [String : GKGraph] { get }
get · iOS 10.0+

rootNode

TypeScript
get rootNode(): (SDKHandle) | null
Swift declaration
var rootNode: (any GKSceneRootNodeType)? { get set }
set · iOS 10.0+

rootNode

TypeScript
set rootNode(value: (Implements<GKSceneRootNodeType> | SDKHandle) | null)
Swift declaration
var rootNode: (any GKSceneRootNodeType)? { get set }

Skipped declarations

1 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

GKScene.init()

inherited init: cannot prove legal (class declares 2 custom initializers)

All GameplayKit types →