<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKMutableTexture/init(size:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKMutableTexture(im)initWithSize:"
  },
  "title" : "init(size:)"
}
-->

# init(size:)

Initializes an empty texture with a specific size.

```
init(size: CGSize)
```

## Parameters

`size`

The size of the texture, in pixels.

## Return Value

An empty mutable texture.

## Discussion

You must call the [`modifyPixelData(_:)`](/documentation/SpriteKit/SKMutableTexture/modifyPixelData(_:)) method at least once before using this texture.

---

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)