---
title: size()
framework: spritekit
role: symbol
role_heading: Instance Method
path: spritekit/sktexture/size()
---

# size()

Gets the size of the texture.

## Declaration

```swift
func size() -> CGSize
```

## Mentioned in

Loading and Using Textures

## Return Value

Return Value The dimensions of the texture, measured in points.

## Discussion

Discussion If the texture was created using an image file and that image file hasn’t been loaded, calling this method forces the texture data to be loaded from the file.

## See Also

### Reading a Texture’s Size and Optional Source Location

- [textureRect()](spritekit/sktexture/texturerect().md)
