<!--
{
  "availability" : [
    "watchOS: 3.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "WatchKit",
  "identifier" : "/documentation/WatchKit/WKInterfaceSKScene/texture(from:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "WatchKit"
    ],
    "preciseIdentifier" : "c:objc(cs)WKInterfaceSKScene(im)textureFromNode:"
  },
  "title" : "texture(from:)"
}
-->

# texture(from:)

Renders the contents of a node tree and returns the rendered image as a SpriteKit texture.

```
func texture(from node: SKNode) -> SKTexture?
```

## Parameters

`node`

A node object representing the root node of the tree to be render to the texture.

## Return Value

A SpriteKit texture that holds the rendered image.

## Discussion

The `node` being rendered does not need to appear in the interface’s presented scene. The new texture is created with a size equal to the rectangle returned by the `node`’s <doc://com.apple.documentation/documentation/SpriteKit/SKNode/calculateAccumulatedFrame()> method. If the `node` is not a scene node, it is rendered with a clear background color (`[SKColor clearColor]`).

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)