Instance Method

retrieveTexture(atlasName:)

Retrieves a single cached texture for a more performant render.

Declaration

@MainActor func retrieveTexture(atlasName: String) -> SKTexture

Parameters

atlasName

Name of the image or atlas stored in assets catalog.

Return Value

SKTexture

Notes:

  1. <#Notes if any#>

Example

let texture: SKTexture = retrieveTexture(atlasName: "enemy_idle")