Instance Method

textureNamed(_:)

Creates a texture from data stored in the texture atlas.

Declaration

func textureNamed(_ name: String) -> SKTexture

Parameters

name

The name of a texture stored in the atlas object.

Return Value

The SpriteKit texture associated with the name. If the specified image does not exist in the atlas object, SpriteKit returns a placeholder texture image.

See Also