<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "SpriteKit",
  "identifier" : "/documentation/SpriteKit/SKSpriteNode/init(texture:size:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "SpriteKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKSpriteNode(cm)spriteNodeWithTexture:size:"
  },
  "title" : "init(texture:size:)"
}
-->

# init(texture:size:)

Initializes a textured sprite using an existing texture object but with a specified size.

```
convenience init(texture: SKTexture?, size: CGSize)
```

## Parameters

`texture`

A SpriteKit texture.

`size`

The size of the sprite in points.

## Return Value

A newly initialized sprite object.

## Discussion

The sprite is initialized using the texture, but the texture’s dimensions are not used. Instead, the size passed into the constructor method is used.

---

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)